diff options
author | Emoly Liu <emoly.liu@intel.com> | 2017-07-31 00:40:22 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-07-31 00:40:22 -0400 |
commit | 191eac33009e6a6d31e87cfa425a20d0e79704b4 (patch) | |
tree | 1591caae6a06c17d6a0290c6179b54027bc3d55b | |
parent | a3bb2d5587521eea6dab2d05326abb0afb460abd (diff) |
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 <emoly.liu@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: tahsin@google.com
-rw-r--r-- | fs/ext4/xattr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index cff4f41ced61..de217a094733 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, | |||
451 | } | 451 | } |
452 | /* Do not add ea_inode to the cache. */ | 452 | /* Do not add ea_inode to the cache. */ |
453 | ea_inode_cache = NULL; | 453 | ea_inode_cache = NULL; |
454 | err = 0; | ||
454 | } else if (err) | 455 | } else if (err) |
455 | goto out; | 456 | goto out; |
456 | 457 | ||