linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@primarydata.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org, trond.myklebust@primarydata.com,
	hch@infradead.org
Subject: [PATCH v2 3/4] nfsd: nfs4_check_fh - make it actually check the filehandle
Date: Wed, 23 Jul 2014 16:17:40 -0400	[thread overview]
Message-ID: <1406146661-9794-4-git-send-email-jlayton@primarydata.com> (raw)
In-Reply-To: <1406146661-9794-1-git-send-email-jlayton@primarydata.com>

From: Trond Myklebust <trond.myklebust@primarydata.com>

...instead of just checking the inode that corresponds to it.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
 fs/nfsd/nfs4state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ab96718df3cc..6ced8d566c0b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3951,7 +3951,7 @@ laundromat_main(struct work_struct *laundry)
 
 static inline __be32 nfs4_check_fh(struct svc_fh *fhp, struct nfs4_ol_stateid *stp)
 {
-	if (fhp->fh_dentry->d_inode != stp->st_file->fi_inode)
+	if (!nfsd_fh_match(&fhp->fh_handle, &stp->st_file->fi_fhandle))
 		return nfserr_bad_stateid;
 	return nfs_ok;
 }
-- 
1.9.3


  parent reply	other threads:[~2014-07-23 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 20:17 [PATCH v2 0/4] nfsd: don't let nfs4_file pin down the inode when it has no open state Jeff Layton
2014-07-23 20:17 ` [PATCH v2 1/4] nfsd: Store the filehandle with the struct nfs4_file Jeff Layton
2014-07-23 20:17 ` [PATCH v2 2/4] nfsd: Use the filehandle to look up the struct nfs4_file instead of inode Jeff Layton
2014-07-23 20:17 ` Jeff Layton [this message]
2014-07-23 20:17 ` [PATCH v2 4/4] nfsd: Do not let nfs4_file pin the struct inode Jeff Layton
2014-07-23 20:47 ` [PATCH v2 0/4] nfsd: don't let nfs4_file pin down the inode when it has no open state J. Bruce Fields
2014-07-24 15:22   ` Christoph Hellwig
2014-07-25  1:40     ` J. Bruce Fields

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=1406146661-9794-4-git-send-email-jlayton@primarydata.com \
    --to=jlayton@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).