Skip to content

Commit 1ee889f

Browse files
mjguzikJaegeuk Kim
authored andcommitted
f2fs: don't call iput() from f2fs_drop_inode()
iput() calls the problematic routine, which does a ->i_count inc/dec cycle. Undoing it with iput() recurses into the problem. Note f2fs should not be playing games with the refcount to begin with, but that will be handled later. Right now solve the immediate regression. Fixes: bc986b1 ("fs: stop accessing ->i_count directly in f2fs and gfs2") Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202509301450.138b448f-lkp@intel.com Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 3a86608 commit 1ee889f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/f2fs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ static int f2fs_drop_inode(struct inode *inode)
18201820
sb_end_intwrite(inode->i_sb);
18211821

18221822
spin_lock(&inode->i_lock);
1823-
iput(inode);
1823+
atomic_dec(&inode->i_count);
18241824
}
18251825
trace_f2fs_drop_inode(inode, 0);
18261826
return 0;

0 commit comments

Comments
 (0)