]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFSv4.1/pnfs: Remove redundant lo->plh_block_lgets in layoutreturn
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 4 Aug 2015 20:15:48 +0000 (16:15 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 12 Aug 2015 18:56:19 +0000 (14:56 -0400)
The NFS_LAYOUT_RETURN bit already suffices to ensure that layoutget
is blocked.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.c

index 8c5f9f59efbb2ea1249648a088d39560a6dad945..ada07376a6c751e18d559c48d6df373c90136c30 100644 (file)
@@ -368,7 +368,6 @@ pnfs_prepare_layoutreturn(struct pnfs_layout_hdr *lo)
        if (test_and_set_bit(NFS_LAYOUT_RETURN, &lo->plh_flags))
                return false;
        lo->plh_return_iomode = 0;
-       lo->plh_block_lgets++;
        pnfs_get_layout_hdr(lo);
        clear_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE, &lo->plh_flags);
        return true;
@@ -954,7 +953,6 @@ pnfs_send_layoutreturn(struct pnfs_layout_hdr *lo, nfs4_stateid stateid,
        if (unlikely(lrp == NULL)) {
                status = -ENOMEM;
                spin_lock(&ino->i_lock);
-               lo->plh_block_lgets--;
                pnfs_clear_layoutreturn_waitbit(lo);
                rpc_wake_up(&NFS_SERVER(ino)->roc_rpcwaitq);
                spin_unlock(&ino->i_lock);