diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 65 |
1 files changed, 48 insertions, 17 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index aeff0fe5b6b9..22857c639df5 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/cifsfs.c | 2 | * fs/cifs/cifsfs.c |
3 | * | 3 | * |
4 | * Copyright (C) International Business Machines Corp., 2002,2007 | 4 | * Copyright (C) International Business Machines Corp., 2002,2008 |
5 | * Author(s): Steve French (sfrench@us.ibm.com) | 5 | * Author(s): Steve French (sfrench@us.ibm.com) |
6 | * | 6 | * |
7 | * Common Internet FileSystem (CIFS) client | 7 | * Common Internet FileSystem (CIFS) client |
@@ -97,9 +97,6 @@ cifs_read_super(struct super_block *sb, void *data, | |||
97 | { | 97 | { |
98 | struct inode *inode; | 98 | struct inode *inode; |
99 | struct cifs_sb_info *cifs_sb; | 99 | struct cifs_sb_info *cifs_sb; |
100 | #ifdef CONFIG_CIFS_DFS_UPCALL | ||
101 | int len; | ||
102 | #endif | ||
103 | int rc = 0; | 100 | int rc = 0; |
104 | 101 | ||
105 | /* BB should we make this contingent on mount parm? */ | 102 | /* BB should we make this contingent on mount parm? */ |
@@ -117,15 +114,17 @@ cifs_read_super(struct super_block *sb, void *data, | |||
117 | * complex operation (mount), and in case of fail | 114 | * complex operation (mount), and in case of fail |
118 | * just exit instead of doing mount and attempting | 115 | * just exit instead of doing mount and attempting |
119 | * undo it if this copy fails?*/ | 116 | * undo it if this copy fails?*/ |
120 | len = strlen(data); | 117 | if (data) { |
121 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); | 118 | int len = strlen(data); |
122 | if (cifs_sb->mountdata == NULL) { | 119 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); |
123 | kfree(sb->s_fs_info); | 120 | if (cifs_sb->mountdata == NULL) { |
124 | sb->s_fs_info = NULL; | 121 | kfree(sb->s_fs_info); |
125 | return -ENOMEM; | 122 | sb->s_fs_info = NULL; |
123 | return -ENOMEM; | ||
124 | } | ||
125 | strncpy(cifs_sb->mountdata, data, len + 1); | ||
126 | cifs_sb->mountdata[len] = '\0'; | ||
126 | } | 127 | } |
127 | strncpy(cifs_sb->mountdata, data, len + 1); | ||
128 | cifs_sb->mountdata[len] = '\0'; | ||
129 | #endif | 128 | #endif |
130 | 129 | ||
131 | rc = cifs_mount(sb, cifs_sb, data, devname); | 130 | rc = cifs_mount(sb, cifs_sb, data, devname); |
@@ -353,9 +352,41 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m) | |||
353 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || | 352 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || |
354 | !(cifs_sb->tcon->unix_ext)) | 353 | !(cifs_sb->tcon->unix_ext)) |
355 | seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); | 354 | seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); |
355 | if (!cifs_sb->tcon->unix_ext) { | ||
356 | seq_printf(s, ",file_mode=0%o,dir_mode=0%o", | ||
357 | cifs_sb->mnt_file_mode, | ||
358 | cifs_sb->mnt_dir_mode); | ||
359 | } | ||
360 | if (cifs_sb->tcon->seal) | ||
361 | seq_printf(s, ",seal"); | ||
362 | if (cifs_sb->tcon->nocase) | ||
363 | seq_printf(s, ",nocase"); | ||
364 | if (cifs_sb->tcon->retry) | ||
365 | seq_printf(s, ",hard"); | ||
356 | } | 366 | } |
357 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) | 367 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) |
358 | seq_printf(s, ",posixpaths"); | 368 | seq_printf(s, ",posixpaths"); |
369 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) | ||
370 | seq_printf(s, ",setuids"); | ||
371 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) | ||
372 | seq_printf(s, ",serverino"); | ||
373 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) | ||
374 | seq_printf(s, ",directio"); | ||
375 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | ||
376 | seq_printf(s, ",nouser_xattr"); | ||
377 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR) | ||
378 | seq_printf(s, ",mapchars"); | ||
379 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) | ||
380 | seq_printf(s, ",sfu"); | ||
381 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) | ||
382 | seq_printf(s, ",nobrl"); | ||
383 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) | ||
384 | seq_printf(s, ",cifsacl"); | ||
385 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) | ||
386 | seq_printf(s, ",dynperm"); | ||
387 | if (m->mnt_sb->s_flags & MS_POSIXACL) | ||
388 | seq_printf(s, ",acl"); | ||
389 | |||
359 | seq_printf(s, ",rsize=%d", cifs_sb->rsize); | 390 | seq_printf(s, ",rsize=%d", cifs_sb->rsize); |
360 | seq_printf(s, ",wsize=%d", cifs_sb->wsize); | 391 | seq_printf(s, ",wsize=%d", cifs_sb->wsize); |
361 | } | 392 | } |
@@ -657,7 +688,7 @@ const struct file_operations cifs_file_ops = { | |||
657 | .splice_read = generic_file_splice_read, | 688 | .splice_read = generic_file_splice_read, |
658 | .llseek = cifs_llseek, | 689 | .llseek = cifs_llseek, |
659 | #ifdef CONFIG_CIFS_POSIX | 690 | #ifdef CONFIG_CIFS_POSIX |
660 | .ioctl = cifs_ioctl, | 691 | .unlocked_ioctl = cifs_ioctl, |
661 | #endif /* CONFIG_CIFS_POSIX */ | 692 | #endif /* CONFIG_CIFS_POSIX */ |
662 | 693 | ||
663 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 694 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -677,7 +708,7 @@ const struct file_operations cifs_file_direct_ops = { | |||
677 | .flush = cifs_flush, | 708 | .flush = cifs_flush, |
678 | .splice_read = generic_file_splice_read, | 709 | .splice_read = generic_file_splice_read, |
679 | #ifdef CONFIG_CIFS_POSIX | 710 | #ifdef CONFIG_CIFS_POSIX |
680 | .ioctl = cifs_ioctl, | 711 | .unlocked_ioctl = cifs_ioctl, |
681 | #endif /* CONFIG_CIFS_POSIX */ | 712 | #endif /* CONFIG_CIFS_POSIX */ |
682 | .llseek = cifs_llseek, | 713 | .llseek = cifs_llseek, |
683 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 714 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -697,7 +728,7 @@ const struct file_operations cifs_file_nobrl_ops = { | |||
697 | .splice_read = generic_file_splice_read, | 728 | .splice_read = generic_file_splice_read, |
698 | .llseek = cifs_llseek, | 729 | .llseek = cifs_llseek, |
699 | #ifdef CONFIG_CIFS_POSIX | 730 | #ifdef CONFIG_CIFS_POSIX |
700 | .ioctl = cifs_ioctl, | 731 | .unlocked_ioctl = cifs_ioctl, |
701 | #endif /* CONFIG_CIFS_POSIX */ | 732 | #endif /* CONFIG_CIFS_POSIX */ |
702 | 733 | ||
703 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 734 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -716,7 +747,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { | |||
716 | .flush = cifs_flush, | 747 | .flush = cifs_flush, |
717 | .splice_read = generic_file_splice_read, | 748 | .splice_read = generic_file_splice_read, |
718 | #ifdef CONFIG_CIFS_POSIX | 749 | #ifdef CONFIG_CIFS_POSIX |
719 | .ioctl = cifs_ioctl, | 750 | .unlocked_ioctl = cifs_ioctl, |
720 | #endif /* CONFIG_CIFS_POSIX */ | 751 | #endif /* CONFIG_CIFS_POSIX */ |
721 | .llseek = cifs_llseek, | 752 | .llseek = cifs_llseek, |
722 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 753 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -731,7 +762,7 @@ const struct file_operations cifs_dir_ops = { | |||
731 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 762 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
732 | .dir_notify = cifs_dir_notify, | 763 | .dir_notify = cifs_dir_notify, |
733 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 764 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
734 | .ioctl = cifs_ioctl, | 765 | .unlocked_ioctl = cifs_ioctl, |
735 | }; | 766 | }; |
736 | 767 | ||
737 | static void | 768 | static void |