aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-07-11 14:30:34 -0400
committerSteve French <sfrench@us.ibm.com>2007-07-11 14:30:34 -0400
commit7521a3c566dda7bb09576975324fc0a08a79ad14 (patch)
tree2ba0405ea1a7f3f187c2434ef86000b1b65f2d01 /fs/cifs/cifsfs.c
parentfb8c4b14d9259ba467241a7aaeb712caedce7ee8 (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/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 17ed7cf750af..40f35f0263ac 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -114,10 +114,6 @@ cifs_read_super(struct super_block *sb, void *data,
114 114
115 sb->s_magic = CIFS_MAGIC_NUMBER; 115 sb->s_magic = CIFS_MAGIC_NUMBER;
116 sb->s_op = &cifs_super_ops; 116 sb->s_op = &cifs_super_ops;
117#ifdef CONFIG_CIFS_EXPERIMENTAL
118 if (experimEnabled != 0)
119 sb->s_export_op = &cifs_export_ops;
120#endif /* EXPERIMENTAL */
121/* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512) 117/* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
122 sb->s_blocksize = 118 sb->s_blocksize =
123 cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */ 119 cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
@@ -139,6 +135,13 @@ cifs_read_super(struct super_block *sb, void *data,
139 rc = -ENOMEM; 135 rc = -ENOMEM;
140 goto out_no_root; 136 goto out_no_root;
141 } 137 }
138
139#ifdef CONFIG_CIFS_EXPERIMENTAL
140 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
141 cFYI(1, ("export ops supported"));
142 sb->s_export_op = &cifs_export_ops;
143 }
144#endif /* EXPERIMENTAL */
142 145
143 return 0; 146 return 0;
144 147