summaryrefslogtreecommitdiffstats
path: root/fs/cifs/export.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-07-11 18:30:34 +0000
committerSteve French <sfrench@us.ibm.com>2007-07-11 18:30:34 +0000
commit7521a3c566dda7bb09576975324fc0a08a79ad14 (patch)
tree2ba0405ea1a7f3f187c2434ef86000b1b65f2d01 /fs/cifs/export.c
parentfb8c4b14d9259ba467241a7aaeb712caedce7ee8 (diff)
downloadlinux-7521a3c566dda7bb09576975324fc0a08a79ad14.tar.gz
linux-7521a3c566dda7bb09576975324fc0a08a79ad14.tar.bz2
linux-7521a3c566dda7bb09576975324fc0a08a79ad14.zip
[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 <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/export.c')
-rw-r--r--fs/cifs/export.c15
1 files changed, 15 insertions, 0 deletions
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 <linux/fs.h>
+#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);
}