summaryrefslogtreecommitdiff
path: root/quotacheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'quotacheck.c')
-rw-r--r--quotacheck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/quotacheck.c b/quotacheck.c
index 0e9bac9..8853491 100644
--- a/quotacheck.c
+++ b/quotacheck.c
@@ -455,8 +455,10 @@ static int ext2_direct_scan(char *device)
return -1;
}
- while ((long)i_num) {
- if (inode.i_links_count) {
+ while (i_num) {
+ if ((i_num == EXT2_ROOT_INO ||
+ i_num >= EXT2_FIRST_INO(fs->super)) &&
+ inode.i_links_count) {
debug(FL_DEBUG, _("Found i_num %ld, blocks %ld\n"), (long)i_num, (long)inode.i_blocks);
if (flags & FL_VERBOSE)
blit(NULL);