diff options
author | Steve French <sfrench@us.ibm.com> | 2007-07-11 14:30:34 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-07-11 14:30:34 -0400 |
commit | 7521a3c566dda7bb09576975324fc0a08a79ad14 (patch) | |
tree | 2ba0405ea1a7f3f187c2434ef86000b1b65f2d01 /fs/cifs/export.c | |
parent | fb8c4b14d9259ba467241a7aaeb712caedce7ee8 (diff) |
[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.c | 15 |
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 @@ | |||
26 | /* | 26 | /* |
27 | * See Documentation/filesystems/Exporting | 27 | * See Documentation/filesystems/Exporting |
28 | * and examples in fs/exportfs | 28 | * and examples in fs/exportfs |
29 | * | ||
30 | * Since cifs is a network file system, an "fsid" must be included for | ||
31 | * any nfs exports file entries which refer to cifs paths. In addition | ||
32 | * the cifs mount must be mounted with the "serverino" option (ie use stable | ||
33 | * server inode numbers instead of locally generated temporary ones). | ||
34 | * Although cifs inodes do not use generation numbers (have generation number | ||
35 | * of zero) - the inode number alone should be good enough for simple cases | ||
36 | * in which users want to export cifs shares with NFS. The decode and encode | ||
37 | * could be improved by using a new routine which expects 64 bit inode numbers | ||
38 | * instead of the default 32 bit routines in fs/exportfs | ||
39 | * | ||
29 | */ | 40 | */ |
30 | 41 | ||
31 | #include <linux/fs.h> | 42 | #include <linux/fs.h> |
43 | #include "cifsglob.h" | ||
44 | #include "cifs_debug.h" | ||
45 | |||
32 | 46 | ||
33 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 47 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
34 | 48 | ||
35 | static struct dentry *cifs_get_parent(struct dentry *dentry) | 49 | static struct dentry *cifs_get_parent(struct dentry *dentry) |
36 | { | 50 | { |
37 | /* BB need to add code here eventually to enable export via NFSD */ | 51 | /* BB need to add code here eventually to enable export via NFSD */ |
52 | cFYI(1, ("get parent for %p", dentry)); | ||
38 | return ERR_PTR(-EACCES); | 53 | return ERR_PTR(-EACCES); |
39 | } | 54 | } |
40 | 55 | ||