mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
f2fs: avoid stale fi->gdirty_list pointer
When doing fault injection test, f2fs_evict_inode() didn't remove gdirty_list which incurs a kernel panic due to wrong pointer access. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
204b4ae067
commit
943973cd52
@ -520,8 +520,10 @@ no_delete:
|
||||
stat_dec_inline_dir(inode);
|
||||
stat_dec_inline_inode(inode);
|
||||
|
||||
if (!is_set_ckpt_flags(sbi, CP_ERROR_FLAG))
|
||||
if (likely(!is_set_ckpt_flags(sbi, CP_ERROR_FLAG)))
|
||||
f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE));
|
||||
else
|
||||
f2fs_inode_synced(inode);
|
||||
|
||||
/* ino == 0, if f2fs_new_inode() was failed t*/
|
||||
if (inode->i_ino)
|
||||
|
Loading…
Reference in New Issue
Block a user