staging: lustre: llite: handle xattr cache refill race
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 16 Apr 2018 04:14:54 +0000 (00:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:57:40 +0000 (14:57 +0200)
In ll_xattr_cache_refill() if the xattr cache was invalid (and no
request was sent) then return -EAGAIN so that ll_getxattr_common()
caller will fetch the xattr from the MDT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10132
Reviewed-on: https://review.whamcloud.com/29654
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr_cache.c

index 53dfaeade53529143f0f119c771e5c6edbdcb501..5da69ba088c4051fbc307749505868e1296f5387 100644 (file)
@@ -357,7 +357,7 @@ static int ll_xattr_cache_refill(struct inode *inode)
        if (unlikely(!req)) {
                CDEBUG(D_CACHE, "cancelled by a parallel getxattr\n");
                ll_intent_drop_lock(&oit);
-               rc = -EIO;
+               rc = -EAGAIN;
                goto err_unlock;
        }