]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: remove unneeded check condition in __f2fs_setxattr()
authorChao Yu <chao@kernel.org>
Wed, 19 Jul 2023 13:50:46 +0000 (21:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:07:55 +0000 (15:07 +0200)
[ Upstream commit bc3994ffa4cf23f55171943c713366132c3ff45d ]

It has checked return value of write_all_xattrs(), remove unneeded
following check condition.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Stable-dep-of: aaf8c0b9ae04 ("f2fs: reduce expensive checkpoint trigger frequency")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/xattr.c

index a3a11678d414d3896ad5930a5119a5d49d0cae7e..c92ddc8c33a14a99a58b885b5189b25635cb2489 100644 (file)
@@ -756,7 +756,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
        if (index == F2FS_XATTR_INDEX_ENCRYPTION &&
                        !strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT))
                f2fs_set_encrypted_inode(inode);
-       if (!error && S_ISDIR(inode->i_mode))
+       if (S_ISDIR(inode->i_mode))
                set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_CP);
 
 same: