add patch error-should-be-cleared-if-ea_inode-isnt-added-to-cache
[ext4-patch-queue.git] / error-should-be-cleared-if-ea_inode-isnt-added-to-cache
blob66c0efe196a426669260ac05e0b46431a5205db2
1 ext4: error should be cleared if ea_inode isn't added to the cache
3 From: Emoly Liu <emoly.liu@intel.com>
5 For Lustre, if ea_inode fails in hash validation but passes parent
6 inode and generation checks, it won't be added to the cache as well
7 as the error "-EFSCORRUPTED" should be cleared, otherwise it will
8 cause "Structure needs cleaning" when running getfattr command.
10 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723
12 Cc: stable@vger.kernel.org
13 Fixes: dec214d00e0d78a08b947d7dccdfdb84407a9f4d
14 Signed-off-by: Emoly Liu <emoly.liu@intel.com>
15 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 Reviewed-by: Andreas Dilger <adilger@dilger.ca>
17 Reviewed-by: tahsin@google.com
18 ---
19  fs/ext4/xattr.c | 1 +
20  1 file changed, 1 insertion(+)
22 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
23 index cff4f41..de217a0 100644
24 --- a/fs/ext4/xattr.c
25 +++ b/fs/ext4/xattr.c
26 @@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
27                 }
28                 /* Do not add ea_inode to the cache. */
29                 ea_inode_cache = NULL;
30 +               err = 0;
31         } else if (err)
32                 goto out;
34 -- 
35 1.8.3.1