Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177172
b: refs/heads/master
c: f39bde2
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Sep 28, 2009
1 parent 3212b58 commit 4fc6a57
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 289ede453e5a621de19c61e630302b1845cc1d59
refs/heads/master: f39bde24b275ddc45df1ed835725b609e178c7a0
22 changes: 18 additions & 4 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,23 @@ rqst_exp_parent(struct svc_rqst *rqstp, struct path *path)
return exp;
}

static struct svc_export *find_fsidzero_export(struct svc_rqst *rqstp)
{
struct svc_export *exp;
u32 fsidv[2];

mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL);

exp = rqst_exp_find(rqstp, FSID_NUM, fsidv);
/*
* We shouldn't have accepting an nfsv4 request at all if we
* don't have a pseudoexport!:
*/
if (IS_ERR(exp) && PTR_ERR(exp) == -ENOENT)
exp = ERR_PTR(-ESERVERFAULT);
return exp;
}

/*
* Called when we need the filehandle for the root of the pseudofs,
* for a given NFSv4 client. The root is defined to be the
Expand All @@ -1330,11 +1347,8 @@ exp_pseudoroot(struct svc_rqst *rqstp, struct svc_fh *fhp)
{
struct svc_export *exp;
__be32 rv;
u32 fsidv[2];

mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL);

exp = rqst_exp_find(rqstp, FSID_NUM, fsidv);
exp = find_fsidzero_export(rqstp);
if (IS_ERR(exp))
return nfserrno(PTR_ERR(exp));
rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfsd/nfsproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ nfserrno (int errno)
{ nfserr_io, -ETXTBSY },
{ nfserr_notsupp, -EOPNOTSUPP },
{ nfserr_toosmall, -ETOOSMALL },
{ nfserr_serverfault, -ESERVERFAULT },
};
int i;

Expand Down

0 comments on commit 4fc6a57

Please sign in to comment.