lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] f2fs: fix to detect cp error in f2fs_setxattr()
Date
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>
---
fs/f2fs/xattr.c | 2 ++
1 file changed, 2 insertions(+)

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;
--
2.18.0.rc1
\
 
 \ /
  Last update: 2019-07-22 11:58    [W:0.036 / U:0.344 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site