Fix ext2 dentry allocation glitch.
When remove dentry, check if cached position is greater than removed one.
This commit is contained in:
parent
426cddbb30
commit
13ded5339f
1 changed files with 5 additions and 3 deletions
|
@ -608,9 +608,11 @@ int ftype; /* used when ENTER and
|
||||||
if (!HAS_COMPAT_FEATURE(ldir_ptr->i_sp,
|
if (!HAS_COMPAT_FEATURE(ldir_ptr->i_sp,
|
||||||
COMPAT_DIR_INDEX))
|
COMPAT_DIR_INDEX))
|
||||||
ldir_ptr->i_flags &= ~EXT2_INDEX_FL;
|
ldir_ptr->i_flags &= ~EXT2_INDEX_FL;
|
||||||
ldir_ptr->i_last_dpos = pos;
|
if (pos < ldir_ptr->i_last_dpos) {
|
||||||
ldir_ptr->i_last_dentry_size = conv2(le_CPU,
|
ldir_ptr->i_last_dpos = pos;
|
||||||
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_update |= CTIME | MTIME;
|
||||||
ldir_ptr->i_dirt = DIRTY;
|
ldir_ptr->i_dirt = DIRTY;
|
||||||
/* Now we have cleared dentry, if it's not
|
/* Now we have cleared dentry, if it's not
|
||||||
|
|
Loading…
Reference in a new issue