All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Rees <rees@umich.edu>
To: Benny Halevy <bhalevy@panasas.com>
Cc: linux-nfs@vger.kernel.org, peter honeyman <honey@citi.umich.edu>
Subject: [PATCH] zero out delegation in the inode after it has been returned
Date: Mon, 28 Feb 2011 16:31:03 -0500	[thread overview]
Message-ID: <20110228213103.GA1256@merit.edu> (raw)

Signed-off-by: Jim Rees <rees@umich.edu>
---
 fs/nfs/delegation.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index bbbc6bf..5bc4f7e 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -176,9 +176,11 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred,
 
 static int nfs_do_return_delegation(struct inode *inode, struct nfs_delegation *delegation, int issync)
 {
+	struct nfs_inode *nfsi = NFS_I(inode);
 	int res = 0;
 
 	res = nfs4_proc_delegreturn(inode, delegation->cred, &delegation->stateid, issync);
+	rcu_assign_pointer(nfsi->delegation, NULL);
 	nfs_free_delegation(delegation);
 	return res;
 }
-- 
1.7.1


             reply	other threads:[~2011-02-28 21:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 21:31 Jim Rees [this message]
2011-02-28 21:39 ` [PATCH] zero out delegation in the inode after it has been returned Trond Myklebust
2011-02-28 21:54   ` Jim Rees
2011-02-28 22:01     ` Trond Myklebust
2011-02-28 22:04       ` Trond Myklebust
2011-02-28 23:22       ` Jim Rees
2011-03-01  0:00         ` Trond Myklebust
2011-03-01  0:07           ` Trond Myklebust
2011-03-01  4:09           ` J. Bruce Fields
2011-03-01  9:52             ` daniel.gardere
2011-03-01 12:16               ` Trond Myklebust
2011-03-01 13:06                 ` daniel.gardere

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=20110228213103.GA1256@merit.edu \
    --to=rees@umich.edu \
    --cc=bhalevy@panasas.com \
    --cc=honey@citi.umich.edu \
    --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.