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.
bitmap-optimize
Theodore Ts'o 2001-08-13 06:11:39 -04:00
parent 5faba3acba
commit 85645a6ff3
2 changed files with 8 additions and 6 deletions

View 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

View 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;