f2fs: remove unneeded f2fs_cp_error() in f2fs_create_whiteout()
authorChao Yu <chao@kernel.org>
Mon, 9 Jan 2023 03:47:34 +0000 (11:47 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 31 Jan 2023 18:47:44 +0000 (10:47 -0800)
f2fs_rename() has checked CP_ERROR_FLAG, so remove redundant check
in f2fs_create_whiteout().

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/namei.c

index 6032589..8292327 100644 (file)
@@ -926,9 +926,6 @@ static int f2fs_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,
 static int f2fs_create_whiteout(struct user_namespace *mnt_userns,
                                struct inode *dir, struct inode **whiteout)
 {
-       if (unlikely(f2fs_cp_error(F2FS_I_SB(dir))))
-               return -EIO;
-
        return __f2fs_tmpfile(mnt_userns, dir, NULL,
                                S_IFCHR | WHITEOUT_MODE, true, whiteout);
 }