diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-07-22 11:57:06 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 16:57:11 +0200 |
commit | a25c2cdcb61ab3d8d99623a9e72cf1747979a1f9 (patch) | |
tree | 3d598ef0e5a6d17945bef3b1237ee40efef0a39a /fs/f2fs | |
parent | f2fs: fix to spread f2fs_is_checkpoint_ready() (diff) | |
download | linux-a25c2cdcb61ab3d8d99623a9e72cf1747979a1f9.tar.xz linux-a25c2cdcb61ab3d8d99623a9e72cf1747979a1f9.zip |
f2fs: fix to detect cp error in f2fs_setxattr()
It needs to return -EIO if filesystem has been shutdown, fix the
miss case in f2fs_setxattr().
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/xattr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 3c92f4122044..f85c810e33ca 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -730,6 +730,8 @@ int f2fs_setxattr(struct inode *inode, int index, const char *name, struct f2fs_sb_info *sbi = F2FS_I_SB(inode); int err; + if (unlikely(f2fs_cp_error(sbi))) + return -EIO; err = f2fs_is_checkpoint_ready(sbi); if (err) return err; |