From: Emoly Liu Date: Mon, 31 Jul 2017 04:40:22 +0000 (-0400) Subject: ext4: error should be cleared if ea_inode isn't added to the cache X-Git-Tag: v4.14-rc1~329^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=191eac33009e6a6d31e87cfa425a20d0e79704b4;p=platform%2Fkernel%2Flinux-rpi3.git ext4: error should be cleared if ea_inode isn't added to the cache For Lustre, if ea_inode fails in hash validation but passes parent inode and generation checks, it won't be added to the cache as well as the error "-EFSCORRUPTED" should be cleared, otherwise it will cause "Structure needs cleaning" when running getfattr command. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723 Cc: stable@vger.kernel.org Fixes: dec214d00e0d78a08b947d7dccdfdb84407a9f4d Signed-off-by: Emoly Liu Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Reviewed-by: tahsin@google.com --- diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index cff4f41..de217a0 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -451,6 +451,7 @@ ext4_xattr_inode_get(struct inode *inode, struct ext4_xattr_entry *entry, } /* Do not add ea_inode to the cache. */ ea_inode_cache = NULL; + err = 0; } else if (err) goto out;