diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 3752b9f6d9e4..85ea98d139fc 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -147,18 +147,17 @@ cifs_read_super(struct super_block *sb) | |||
147 | goto out_no_root; | 147 | goto out_no_root; |
148 | } | 148 | } |
149 | 149 | ||
150 | if (cifs_sb_master_tcon(cifs_sb)->nocase) | ||
151 | sb->s_d_op = &cifs_ci_dentry_ops; | ||
152 | else | ||
153 | sb->s_d_op = &cifs_dentry_ops; | ||
154 | |||
150 | sb->s_root = d_make_root(inode); | 155 | sb->s_root = d_make_root(inode); |
151 | if (!sb->s_root) { | 156 | if (!sb->s_root) { |
152 | rc = -ENOMEM; | 157 | rc = -ENOMEM; |
153 | goto out_no_root; | 158 | goto out_no_root; |
154 | } | 159 | } |
155 | 160 | ||
156 | /* do that *after* d_make_root() - we want NULL ->d_op for root here */ | ||
157 | if (cifs_sb_master_tcon(cifs_sb)->nocase) | ||
158 | sb->s_d_op = &cifs_ci_dentry_ops; | ||
159 | else | ||
160 | sb->s_d_op = &cifs_dentry_ops; | ||
161 | |||
162 | #ifdef CONFIG_CIFS_NFSD_EXPORT | 161 | #ifdef CONFIG_CIFS_NFSD_EXPORT |
163 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 162 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
164 | cifs_dbg(FYI, "export ops supported\n"); | 163 | cifs_dbg(FYI, "export ops supported\n"); |
@@ -312,11 +311,14 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server) | |||
312 | } | 311 | } |
313 | 312 | ||
314 | static void | 313 | static void |
315 | cifs_show_security(struct seq_file *s, struct TCP_Server_Info *server) | 314 | cifs_show_security(struct seq_file *s, struct cifs_ses *ses) |
316 | { | 315 | { |
316 | if (ses->sectype == Unspecified) | ||
317 | return; | ||
318 | |||
317 | seq_printf(s, ",sec="); | 319 | seq_printf(s, ",sec="); |
318 | 320 | ||
319 | switch (server->secType) { | 321 | switch (ses->sectype) { |
320 | case LANMAN: | 322 | case LANMAN: |
321 | seq_printf(s, "lanman"); | 323 | seq_printf(s, "lanman"); |
322 | break; | 324 | break; |
@@ -338,7 +340,7 @@ cifs_show_security(struct seq_file *s, struct TCP_Server_Info *server) | |||
338 | break; | 340 | break; |
339 | } | 341 | } |
340 | 342 | ||
341 | if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 343 | if (ses->sign) |
342 | seq_printf(s, "i"); | 344 | seq_printf(s, "i"); |
343 | } | 345 | } |
344 | 346 | ||
@@ -369,7 +371,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root) | |||
369 | srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; | 371 | srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; |
370 | 372 | ||
371 | seq_printf(s, ",vers=%s", tcon->ses->server->vals->version_string); | 373 | seq_printf(s, ",vers=%s", tcon->ses->server->vals->version_string); |
372 | cifs_show_security(s, tcon->ses->server); | 374 | cifs_show_security(s, tcon->ses); |
373 | cifs_show_cache_flavor(s, cifs_sb); | 375 | cifs_show_cache_flavor(s, cifs_sb); |
374 | 376 | ||
375 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) | 377 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) |
@@ -765,7 +767,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int whence) | |||
765 | 767 | ||
766 | static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) | 768 | static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) |
767 | { | 769 | { |
768 | /* note that this is called by vfs setlease with lock_flocks held | 770 | /* note that this is called by vfs setlease with i_lock held |
769 | to protect *lease from going away */ | 771 | to protect *lease from going away */ |
770 | struct inode *inode = file_inode(file); | 772 | struct inode *inode = file_inode(file); |
771 | struct cifsFileInfo *cfile = file->private_data; | 773 | struct cifsFileInfo *cfile = file->private_data; |
@@ -968,7 +970,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { | |||
968 | }; | 970 | }; |
969 | 971 | ||
970 | const struct file_operations cifs_dir_ops = { | 972 | const struct file_operations cifs_dir_ops = { |
971 | .readdir = cifs_readdir, | 973 | .iterate = cifs_readdir, |
972 | .release = cifs_closedir, | 974 | .release = cifs_closedir, |
973 | .read = generic_read_dir, | 975 | .read = generic_read_dir, |
974 | .unlocked_ioctl = cifs_ioctl, | 976 | .unlocked_ioctl = cifs_ioctl, |