aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBruce Allan <bwa@us.ibm.com>2004-08-22 23:01:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 23:01:55 -0700
commit08dd6c30a33d5313d0fe97af1c276e1aa5cd28ca (patch)
tree64b87792de3c1c45b011f95f2ade8236a3f04a42 /fs
parent14a5171314d14896a2de110ca6c180ecf15641c6 (diff)
downloadhistory-08dd6c30a33d5313d0fe97af1c276e1aa5cd28ca.tar.gz
[PATCH] kNFSd: fix brokenness with fsid= export option
Bruce Allan says: The user-specified fsid= export option still doesn't work after the changes made 5 months ago. Below is a patch against 2.6.7 through the recent 2.6.8-rc2-bk13. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfsfh.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 8e8c2342b184fd..9ac0b9ee8af185 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -339,13 +339,16 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, st
ref_fh_fsid_type = ref_fh->fh_handle.fh_fsid_type;
if (ref_fh_fsid_type > 3)
ref_fh_fsid_type = 0;
- }
- /* make sure ref_fh type works for given export */
- if (ref_fh_fsid_type == 1 &&
- !(exp->ex_flags & NFSEXP_FSID)) {
- /* if we don't have an fsid, we cannot provide one... */
- ref_fh_fsid_type = 0;
- }
+
+ /* make sure ref_fh type works for given export */
+ if (ref_fh_fsid_type == 1 &&
+ !(exp->ex_flags & NFSEXP_FSID)) {
+ /* if we don't have an fsid, we cannot provide one... */
+ ref_fh_fsid_type = 0;
+ }
+ } else if (exp->ex_flags & NFSEXP_FSID)
+ ref_fh_fsid_type = 1;
+
if (!old_valid_dev(ex_dev) && ref_fh_fsid_type == 0) {
/* for newer device numbers, we must use a newer fsid format */
ref_fh_version = 1;