aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/xattr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 963242018663..b32c45621679 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -346,6 +346,9 @@ static int lookup_all_xattrs(struct inode *inode, struct page *ipage,
346 346
347 *xe = __find_xattr(cur_addr, last_txattr_addr, index, len, name); 347 *xe = __find_xattr(cur_addr, last_txattr_addr, index, len, name);
348 if (!*xe) { 348 if (!*xe) {
349 f2fs_err(F2FS_I_SB(inode), "inode (%lu) has corrupted xattr",
350 inode->i_ino);
351 set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
349 err = -EFSCORRUPTED; 352 err = -EFSCORRUPTED;
350 goto out; 353 goto out;
351 } 354 }
@@ -622,6 +625,9 @@ static int __f2fs_setxattr(struct inode *inode, int index,
622 /* find entry with wanted name. */ 625 /* find entry with wanted name. */
623 here = __find_xattr(base_addr, last_base_addr, index, len, name); 626 here = __find_xattr(base_addr, last_base_addr, index, len, name);
624 if (!here) { 627 if (!here) {
628 f2fs_err(F2FS_I_SB(inode), "inode (%lu) has corrupted xattr",
629 inode->i_ino);
630 set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
625 error = -EFSCORRUPTED; 631 error = -EFSCORRUPTED;
626 goto exit; 632 goto exit;
627 } 633 }