* nfsd patches for 2.6.23
@ 2007-09-05 21:22 J. Bruce Fields
2007-09-05 21:22 ` [PATCH 1/2] knfsd: Fixed problem with NFS exporting directories which are mounted on J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2007-09-05 21:22 UTC (permalink / raw)
To: Linus Torvalds; +Cc: nfs, linux-kernel
We've got two nfsd patches that fix a regression and a possible oops, so
both should probably go in before the 2.6.23 release.
Patches will follow, but they're also available from "for-linus" at:
ssh://linux-nfs.org/~bfields/exports/linux.git for-linus
--b.
Neil Brown (2):
knfsd: Fixed problem with NFS exporting directories which are mounted on.
knfsd: Validate filehandle type in fsid_source
fs/nfsd/nfsfh.c | 20 +++++++++++++++-----
fs/nfsd/vfs.c | 3 ++-
2 files changed, 17 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2] knfsd: Fixed problem with NFS exporting directories which are mounted on.
2007-09-05 21:22 nfsd patches for 2.6.23 J. Bruce Fields
@ 2007-09-05 21:22 ` J. Bruce Fields
2007-09-05 21:22 ` [PATCH 2/2] knfsd: Validate filehandle type in fsid_source J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2007-09-05 21:22 UTC (permalink / raw)
To: Linus Torvalds; +Cc: nfs, linux-kernel, Neil Brown, J. Bruce Fields
From: Neil Brown <neilb@suse.de>
Recent changes in NFSd cause a directory which is mounted-on
to not appear properly when the filesystem containing it is exported.
*exp_get* not returns -ENOENT rather than NULL and when
commit 5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1
removed the NULL checks, it didn't add a check for -ENOENT.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
fs/nfsd/vfs.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index a0c2b25..7867151 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -115,7 +115,8 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts);
if (IS_ERR(exp2)) {
- err = PTR_ERR(exp2);
+ if (PTR_ERR(exp2) != -ENOENT)
+ err = PTR_ERR(exp2);
dput(mounts);
mntput(mnt);
goto out;
--
1.5.3
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 2/2] knfsd: Validate filehandle type in fsid_source
2007-09-05 21:22 ` [PATCH 1/2] knfsd: Fixed problem with NFS exporting directories which are mounted on J. Bruce Fields
@ 2007-09-05 21:22 ` J. Bruce Fields
0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2007-09-05 21:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: nfs, linux-kernel, Neil Brown, Luiz Fernando N. Capitulino,
J. Bruce Fields
From: Neil Brown <neilb@suse.de>
fsid_source decided where to get the 'fsid' number to
return for a GETATTR based on the type of filehandle.
It can be from the device, from the fsid, or from the
UUID.
It is possible for the filehandle to be inconsistent
with the export information, so make sure the export information
actually has the info implied by the value returned by
fsid_source.
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Luiz Fernando N. Capitulino" <lcapitulino@gmail.com>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
---
fs/nfsd/nfsfh.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 0eb464a..7011d62 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -566,13 +566,23 @@ enum fsid_source fsid_source(struct svc_fh *fhp)
case FSID_DEV:
case FSID_ENCODE_DEV:
case FSID_MAJOR_MINOR:
- return FSIDSOURCE_DEV;
+ if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags
+ & FS_REQUIRES_DEV)
+ return FSIDSOURCE_DEV;
+ break;
case FSID_NUM:
- return FSIDSOURCE_FSID;
- default:
if (fhp->fh_export->ex_flags & NFSEXP_FSID)
return FSIDSOURCE_FSID;
- else
- return FSIDSOURCE_UUID;
+ break;
+ default:
+ break;
}
+ /* either a UUID type filehandle, or the filehandle doesn't
+ * match the export.
+ */
+ if (fhp->fh_export->ex_flags & NFSEXP_FSID)
+ return FSIDSOURCE_FSID;
+ if (fhp->fh_export->ex_uuid)
+ return FSIDSOURCE_UUID;
+ return FSIDSOURCE_DEV;
}
--
1.5.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-05 21:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05 21:22 nfsd patches for 2.6.23 J. Bruce Fields
2007-09-05 21:22 ` [PATCH 1/2] knfsd: Fixed problem with NFS exporting directories which are mounted on J. Bruce Fields
2007-09-05 21:22 ` [PATCH 2/2] knfsd: Validate filehandle type in fsid_source J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®