From patchwork Wed Jul 12 03:56:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emoly Liu X-Patchwork-Id: 786974 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x6ljw09Ybz9s8J for ; Wed, 12 Jul 2017 14:05:56 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbdGLEF1 (ORCPT ); Wed, 12 Jul 2017 00:05:27 -0400 Received: from [207.108.8.150] ([207.108.8.150]:57826 "HELO mail-1.trevis.hpdd.intel.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1750729AbdGLEF0 (ORCPT ); Wed, 12 Jul 2017 00:05:26 -0400 X-Greylist: delayed 492 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Jul 2017 00:05:26 EDT Received: from trevis-73vm1.trevis.hpdd.intel.com (trevis-73vm1.trevis.hpdd.intel.com [10.9.7.17]) by mail-1.trevis.hpdd.intel.com (Postfix) with ESMTP id BAB972409EC; Wed, 12 Jul 2017 03:57:13 +0000 (UTC) Received: by trevis-73vm1.trevis.hpdd.intel.com (Postfix, from userid 0) id 8F1C111C2E4; Wed, 12 Jul 2017 03:57:13 +0000 (UTC) From: Emoly Liu To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Emoly Liu Subject: [PATCH] ext4: error should be cleared if ea_inode isn't added to the cache Date: Wed, 12 Jul 2017 03:56:53 +0000 Message-Id: <1499831813-13218-1-git-send-email-emoly.liu@intel.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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. Signed-off-by: Emoly Liu Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723 Reviewed-by: tahsin@google.com Reviewed-by: Andreas Dilger --- fs/ext4/xattr.c | 1 + 1 file changed, 1 insertion(+) 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 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino, } /* Do not add ea_inode to the cache. */ ea_inode_cache = NULL; + err = 0; } else if (err) goto out;