Fix ext2 dentry allocation glitch.

When remove dentry, check if cached position is greater than removed
one.
This commit is contained in:
Evgeniy Ivanov 2011-08-11 22:48:26 +04:00 committed by Ben Gras
parent 426cddbb30
commit 13ded5339f

View file

@ -608,9 +608,11 @@ int ftype; /* used when ENTER and
if (!HAS_COMPAT_FEATURE(ldir_ptr->i_sp,
COMPAT_DIR_INDEX))
ldir_ptr->i_flags &= ~EXT2_INDEX_FL;
if (pos < ldir_ptr->i_last_dpos) {
ldir_ptr->i_last_dpos = pos;
ldir_ptr->i_last_dentry_size = conv2(le_CPU,
dp->d_rec_len);
ldir_ptr->i_last_dentry_size =
conv2(le_CPU, dp->d_rec_len);
}
ldir_ptr->i_update |= CTIME | MTIME;
ldir_ptr->i_dirt = DIRTY;
/* Now we have cleared dentry, if it's not