From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 2/3] nfsd4: move guts of nfsd4_lookupp into helper
Date: Fri, 17 Dec 2010 14:01:50 -0500 [thread overview]
Message-ID: <1292612511-14203-3-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1292612511-14203-1-git-send-email-bfields@redhat.com>
We'll reuse this code in secinfo_no_name.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4proc.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index bad4bf8..095431a 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -604,9 +604,7 @@ nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
return status;
}
-static __be32
-nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
- void *arg)
+static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh)
{
struct svc_fh tmp_fh;
__be32 ret;
@@ -615,13 +613,19 @@ nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
ret = exp_pseudoroot(rqstp, &tmp_fh);
if (ret)
return ret;
- if (tmp_fh.fh_dentry == cstate->current_fh.fh_dentry) {
+ if (tmp_fh.fh_dentry == fh->fh_dentry) {
fh_put(&tmp_fh);
return nfserr_noent;
}
fh_put(&tmp_fh);
- return nfsd_lookup(rqstp, &cstate->current_fh,
- "..", 2, &cstate->current_fh);
+ return nfsd_lookup(rqstp, fh, "..", 2, fh);
+}
+
+static __be32
+nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+ void *arg)
+{
+ return nfsd4_do_lookupp(rqstp, &cstate->current_fh);
}
static __be32
--
1.7.1
next prev parent reply other threads:[~2010-12-17 19:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 19:01 4.1 secinfo patches J. Bruce Fields
2010-12-17 19:01 ` [PATCH 1/3] nfsd4: 4.1 SECINFO should consume filehandle J. Bruce Fields
2010-12-17 19:01 ` J. Bruce Fields [this message]
2010-12-17 19:01 ` [PATCH 3/3] nfsd4: implement secinfo_no_name J. Bruce Fields
2010-12-27 6:29 ` Mi Jinlong
2010-12-29 18:56 ` J. Bruce Fields
2010-12-30 4:13 ` Mi Jinlong
2011-01-05 1:05 ` J. Bruce Fields
2011-01-05 15:15 ` Fred Isaman
2011-01-05 15:37 ` J. Bruce Fields
2011-01-05 17:29 ` J. Bruce Fields
2011-01-06 3:54 ` Mi Jinlong
2011-01-11 23:32 ` J. Bruce Fields
2011-01-13 3:20 ` Mi Jinlong
2011-01-18 22:59 ` 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=1292612511-14203-3-git-send-email-bfields@redhat.com \
--to=bfields@redhat.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 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).