Revert "f2fs: remove unneeded check condition in __f2fs_setxattr()"

This reverts commit 7aff4e5b85.
This commit is contained in:
Ksawlii 2024-11-24 00:23:19 +01:00
parent fc246d8ad0
commit ed27a80717

View file

@ -757,7 +757,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 (S_ISDIR(inode->i_mode))
if (!error && S_ISDIR(inode->i_mode))
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_CP);
same: