All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@primarydata.com>
To: anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 1/7] NFSv4.1: Don't check delegations that are already marked as revoked
Date: Tue, 30 Aug 2016 22:11:38 -0400	[thread overview]
Message-ID: <1472609504-69094-2-git-send-email-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <1472609504-69094-1-git-send-email-trond.myklebust@primarydata.com>

If the delegation has been marked as revoked, we don't have to test
it, because we should already have called FREE_STATEID on it.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4proc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e924907cccef..255800b12fad 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2420,6 +2420,11 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state)
 		rcu_read_unlock();
 		return;
 	}
+	if (test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) {
+		rcu_read_unlock();
+		nfs_finish_clear_delegation_stateid(state);
+		return;
+	}
 
 	nfs4_stateid_copy(&stateid, &delegation->stateid);
 	cred = get_rpccred(delegation->cred);
-- 
2.7.4


  reply	other threads:[~2016-08-31  2:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31  2:11 [PATCH 0/7] Fix delegation behaviour when server revokes some state Trond Myklebust
2016-08-31  2:11 ` Trond Myklebust [this message]
2016-08-31  2:11   ` [PATCH 2/7] NFSv4.1: Allow test_stateid to handle session errors without waiting Trond Myklebust
2016-08-31  2:11     ` [PATCH 3/7] NFSv4.1: Add a helper function to deal with expired stateids Trond Myklebust
2016-08-31  2:11       ` [PATCH 4/7] NFSv4.x: Allow callers of nfs_remove_bad_delegation() to specify a stateid Trond Myklebust
2016-08-31  2:11         ` [PATCH 5/7] NFSv4.1: Test delegation stateids when server declares "some state revoked" Trond Myklebust
2016-08-31  2:11           ` [PATCH 6/7] NFSv4.1: Deal with server reboots during delegation expiration recovery Trond Myklebust
2016-08-31  2:11             ` [PATCH 7/7] NFSv4.1: Don't recheck delegations that have already been checked Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472609504-69094-2-git-send-email-trond.myklebust@primarydata.com \
    --to=trond.myklebust@primarydata.com \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.