From: Trond Myklebust <trond.myklebust@primarydata.com>
To: bfields@fieldses.org
Cc: Idan Kedar <idank@primarydata.com>, linux-nfs@vger.kernel.org
Subject: [PATCH 2/2] nfsd: Don't return NFS4ERR_RESTOREFH for NFSv4.1+
Date: Sat, 29 Mar 2014 14:43:39 -0400 [thread overview]
Message-ID: <1396118619-12771-2-git-send-email-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <1396118619-12771-1-git-send-email-trond.myklebust@primarydata.com>
RFC5661 obsoletes NFS4ERR_RESTOREFH in favour of NFS4ERR_NOFILEHANDLE.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
fs/nfsd/nfs4proc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 82189b208af3..eeee4418d44a 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -536,8 +536,11 @@ static __be32
nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
void *arg)
{
- if (!cstate->save_fh.fh_dentry)
+ if (!cstate->save_fh.fh_dentry) {
+ if (nfsd4_has_session(cstate))
+ return nfserr_nofilehandle;
return nfserr_restorefh;
+ }
fh_dup2(&cstate->current_fh, &cstate->save_fh);
if (HAS_STATE_ID(cstate, SAVED_STATE_ID_FLAG)) {
--
1.9.0
next prev parent reply other threads:[~2014-03-29 18:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 18:43 [PATCH 1/2] nfsd: Don't return NFS4ERR_STALE_STATEID for NFSv4.1+ Trond Myklebust
2014-03-29 18:43 ` Trond Myklebust [this message]
2014-03-29 19:34 ` [PATCH 2/2] nfsd: Don't return NFS4ERR_RESTOREFH " J. Bruce Fields
2014-03-29 19:49 ` Trond Myklebust
2014-03-29 20:01 ` Trond Myklebust
2014-03-31 20:52 ` Dr Fields James Bruce
2014-03-29 19:33 ` [PATCH 1/2] nfsd: Don't return NFS4ERR_STALE_STATEID " 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=1396118619-12771-2-git-send-email-trond.myklebust@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=bfields@fieldses.org \
--cc=idank@primarydata.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.