f2fs: fix to add missing iput() in gc_data_segment()
authorChao Yu <chao@kernel.org>
Fri, 10 May 2024 03:43:33 +0000 (11:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 11 May 2024 00:40:07 +0000 (00:40 +0000)
commita798ff17cd2dabe47d5d4ed3d509631793c36e19
tree5428447701a7231434d2f345139140a2fbcde16b
parentf2526c5cf1d94359467d9472387363d57c6b3e6d
f2fs: fix to add missing iput() in gc_data_segment()

During gc_data_segment(), if inode state is abnormal, it missed to call
iput(), fix it.

Fixes: b73e52824c89 ("f2fs: reposition unlock_new_inode to prevent accessing invalid inode")
Fixes: 9056d6489f5a ("f2fs: fix to do sanity check on inode type during garbage collection")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c