Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df547efb03e3e8f9ea726e1d07fbbd6fd0706cd7
Commit:     df547efb03e3e8f9ea726e1d07fbbd6fd0706cd7
Parent:     e677bfe4d451f8271986a229270c6eecd1f62b3f
Author:     J. Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 04:04:43 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 10:23:07 2007 -0700

    knfsd: nfsd4: simplify exp_pseudoroot arguments
    
    We're passing three arguments to exp_pseudoroot, two of which are just 
fields
    of the svc_rqst.  Soon we'll want to pass in a third field as well.  So 
let's
    just give up and pass in the whole struct svc_rqst.
    
    Also sneak in some minor style cleanups while we're at it.
    
    Signed-off-by: "J. Bruce Fields" <[EMAIL PROTECTED]>
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfsd/export.c            |    5 ++---
 fs/nfsd/nfs4proc.c          |    7 +++----
 fs/nfsd/nfs4xdr.c           |    2 +-
 include/linux/nfsd/export.h |    2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index fbbbcc5..af6abb2 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1235,8 +1235,7 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 
*fsidv,
  * export point with fsid==0
  */
 __be32
-exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
-              struct cache_req *creq)
+exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp)
 {
        struct svc_export *exp;
        __be32 rv;
@@ -1244,7 +1243,7 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh 
*fhp,
 
        mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL);
 
-       exp = exp_find(clp, FSID_NUM, fsidv, creq);
+       exp = exp_find(rqstp->rq_client, FSID_NUM, fsidv, rqstp->rq_chandle);
        if (PTR_ERR(exp) == -ENOENT)
                return nfserr_perm;
        if (IS_ERR(exp))
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 8522729..a106e3b 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -286,8 +286,7 @@ nfsd4_putrootfh(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
        __be32 status;
 
        fh_put(&cstate->current_fh);
-       status = exp_pseudoroot(rqstp->rq_client, &cstate->current_fh,
-                             &rqstp->rq_chandle);
+       status = exp_pseudoroot(rqstp, &cstate->current_fh);
        return status;
 }
 
@@ -474,8 +473,8 @@ nfsd4_lookupp(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
        __be32 ret;
 
        fh_init(&tmp_fh, NFS4_FHSIZE);
-       if((ret = exp_pseudoroot(rqstp->rq_client, &tmp_fh,
-                             &rqstp->rq_chandle)) != 0)
+       ret = exp_pseudoroot(rqstp, &tmp_fh);
+       if (ret)
                return ret;
        if (tmp_fh.fh_dentry == cstate->current_fh.fh_dentry) {
                fh_put(&tmp_fh);
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 15809df..b0bfbda 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1296,7 +1296,7 @@ static char *nfsd4_path(struct svc_rqst *rqstp, struct 
svc_export *exp, __be32 *
        char *path, *rootpath;
 
        fh_init(&tmp_fh, NFS4_FHSIZE);
-       *stat = exp_pseudoroot(rqstp->rq_client, &tmp_fh, &rqstp->rq_chandle);
+       *stat = exp_pseudoroot(rqstp, &tmp_fh);
        if (*stat)
                return NULL;
        rootpath = tmp_fh.fh_export->ex_path;
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 736f0ea..5ed4f27 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -135,7 +135,7 @@ struct svc_export * exp_parent(struct auth_domain *clp,
                                   struct cache_req *reqp);
 int                    exp_rootfh(struct auth_domain *, 
                                        char *path, struct knfsd_fh *, int 
maxsize);
-__be32                 exp_pseudoroot(struct auth_domain *, struct svc_fh 
*fhp, struct cache_req *creq);
+__be32                 exp_pseudoroot(struct svc_rqst *, struct svc_fh *);
 __be32                 nfserrno(int errno);
 
 extern struct cache_detail svc_export_cache;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to