From 7521a3c566dda7bb09576975324fc0a08a79ad14 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 11 Jul 2007 18:30:34 +0000 Subject: [CIFS] Fix oops in cifs_create when nfsd server exports cifs mount nfsd is passing null nameidata (probably the only one doing that) on call to create - cifs was missing one check for this. Note that running nfsd over a cifs mount requires specifying fsid on the nfs exports entry and requires mounting cifs with serverino mount option. Signed-off-by: Steve French --- fs/cifs/export.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'fs/cifs/export.c') diff --git a/fs/cifs/export.c b/fs/cifs/export.c index 5a08effda0ae..6e66bc19f0ae 100644 --- a/fs/cifs/export.c +++ b/fs/cifs/export.c @@ -26,15 +26,30 @@ /* * See Documentation/filesystems/Exporting * and examples in fs/exportfs + * + * Since cifs is a network file system, an "fsid" must be included for + * any nfs exports file entries which refer to cifs paths. In addition + * the cifs mount must be mounted with the "serverino" option (ie use stable + * server inode numbers instead of locally generated temporary ones). + * Although cifs inodes do not use generation numbers (have generation number + * of zero) - the inode number alone should be good enough for simple cases + * in which users want to export cifs shares with NFS. The decode and encode + * could be improved by using a new routine which expects 64 bit inode numbers + * instead of the default 32 bit routines in fs/exportfs + * */ #include +#include "cifsglob.h" +#include "cifs_debug.h" + #ifdef CONFIG_CIFS_EXPERIMENTAL static struct dentry *cifs_get_parent(struct dentry *dentry) { /* BB need to add code here eventually to enable export via NFSD */ + cFYI(1, ("get parent for %p", dentry)); return ERR_PTR(-EACCES); } -- cgit v1.2.3