f2fs: fix to handle error paths of {new,change}_curseg()
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Mon, 11 Mar 2024 07:48:54 +0000 (15:48 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 13 Mar 2024 01:25:17 +0000 (18:25 -0700)
commit245930617c9bd85330c78e1a70775e1f61b12f7a
treeaa6efdbb215c654ff0046b8c4245b008253a9de1
parent31f85ccc84b82cc7eb122af01f5017fbe1e29289
f2fs: fix to handle error paths of {new,change}_curseg()

{new,change}_curseg() may return error in some special cases,
error handling should be did in their callers, and this will also
facilitate subsequent error path expansion in {new,change}_curseg().

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/super.c