Whamcloud - gitweb
pass1.c (check_size): Fix logic in check_size; the previous code
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 10:11:39 +0000 (06:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 10:11:39 +0000 (06:11 -0400)
only offered to clear the inode size fields if both size
and i_size_high were zero.

e2fsck/ChangeLog
e2fsck/pass1.c

index d2027f3..4c40052 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-13  Theodore Tso  <tytso@valinux.com>
+
+       * pass1.c (check_size): Fix logic in check_size; the previous code
+               only offered to clear the inode size fields if both size
+               and i_size_high were zero.
+
 2001-08-09  Theodore Tso  <tytso@valinux.com>
 
        * pass1.c, pass2.c, problem.c, problem.h: Fix bug introduced by
index 692ebcf..92cc105 100644 (file)
@@ -204,14 +204,10 @@ static void check_size(e2fsck_t ctx, struct problem_context *pctx)
 {
        struct ext2_inode *inode = pctx->inode;
        
-       if ((LINUX_S_ISBLK(inode->i_mode) ||
-            LINUX_S_ISCHR(inode->i_mode) ||
-            LINUX_S_ISFIFO(inode->i_mode) ||
-            LINUX_S_ISSOCK(inode->i_mode)) && 
-           !inode->i_size || !inode->i_size_high)
+       if ((inode->i_size == 0) && (inode->i_size_high == 0))
                return;
        
-       if(!fix_problem(ctx, PR_1_SET_NONZSIZE, pctx))
+       if (!fix_problem(ctx, PR_1_SET_NONZSIZE, pctx))
                return;
        
        inode->i_size = 0;