aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 20:22:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 20:22:24 -0500
commit0b0e0b5f1a22c20c0f127fb9b457136d6c3ca8ed (patch)
tree0b0200a5f5fbfc9da8ce34230b19c625135d27a4 /fs
parent895663cd92574367054e0eb604a7428852f359b8 (diff)
parent8e87d4dc159148f04f515bc072df22a2c089e7f2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] report rename failure when target file is locked by Windows [CIFS] Allow null user connections [CIFS] Fix readdir breakage when blocksize set too small
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/CHANGES5
-rw-r--r--fs/cifs/connect.c7
-rw-r--r--fs/cifs/inode.c14
-rw-r--r--fs/cifs/readdir.c9
4 files changed, 29 insertions, 6 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 1eb9a2ec0a3b..0b3c37ef52e0 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,6 +1,11 @@
1Version 1.46 1Version 1.46
2------------ 2------------
3Support deep tree mounts. Better support OS/2, Win9x (DOS) time stamps. 3Support deep tree mounts. Better support OS/2, Win9x (DOS) time stamps.
4Allow null user to be specified on mount ("username="). Do not return
5EINVAL on readdir when filldir fails due to overwritten blocksize
6(fixes FC problem). Return error in rename 2nd attempt retry (ie report
7if rename by handle also fails, after rename by path fails, we were
8not reporting whether the retry worked or not).
4 9
5Version 1.45 10Version 1.45
6------------ 11------------
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 4093d5332930..71f77914ce93 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -822,10 +822,13 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
822 } else if (strnicmp(data, "nouser_xattr",12) == 0) { 822 } else if (strnicmp(data, "nouser_xattr",12) == 0) {
823 vol->no_xattr = 1; 823 vol->no_xattr = 1;
824 } else if (strnicmp(data, "user", 4) == 0) { 824 } else if (strnicmp(data, "user", 4) == 0) {
825 if (!value || !*value) { 825 if (!value) {
826 printk(KERN_WARNING 826 printk(KERN_WARNING
827 "CIFS: invalid or missing username\n"); 827 "CIFS: invalid or missing username\n");
828 return 1; /* needs_arg; */ 828 return 1; /* needs_arg; */
829 } else if(!*value) {
830 /* null user, ie anonymous, authentication */
831 vol->nullauth = 1;
829 } 832 }
830 if (strnlen(value, 200) < 200) { 833 if (strnlen(value, 200) < 200) {
831 vol->username = value; 834 vol->username = value;
@@ -1642,6 +1645,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1642 /* BB fixme parse for domain name here */ 1645 /* BB fixme parse for domain name here */
1643 cFYI(1, ("Username: %s ", volume_info.username)); 1646 cFYI(1, ("Username: %s ", volume_info.username));
1644 1647
1648 } else if (volume_info.nullauth) {
1649 cFYI(1,("null user"));
1645 } else { 1650 } else {
1646 cifserror("No username specified"); 1651 cifserror("No username specified");
1647 /* In userspace mount helper we can get user name from alternate 1652 /* In userspace mount helper we can get user name from alternate
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 35d54bb0869a..dffe295825f4 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -885,10 +885,14 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
885 kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); 885 kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL);
886 if (info_buf_source != NULL) { 886 if (info_buf_source != NULL) {
887 info_buf_target = info_buf_source + 1; 887 info_buf_target = info_buf_source + 1;
888 rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName, 888 if (pTcon->ses->capabilities & CAP_UNIX)
889 info_buf_source, cifs_sb_source->local_nls, 889 rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
890 cifs_sb_source->mnt_cifs_flags & 890 info_buf_source,
891 CIFS_MOUNT_MAP_SPECIAL_CHR); 891 cifs_sb_source->local_nls,
892 cifs_sb_source->mnt_cifs_flags &
893 CIFS_MOUNT_MAP_SPECIAL_CHR);
894 /* else rc is still EEXIST so will fall through to
895 unlink the target and retry rename */
892 if (rc == 0) { 896 if (rc == 0) {
893 rc = CIFSSMBUnixQPathInfo(xid, pTcon, toName, 897 rc = CIFSSMBUnixQPathInfo(xid, pTcon, toName,
894 info_buf_target, 898 info_buf_target,
@@ -937,7 +941,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
937 cifs_sb_source->mnt_cifs_flags & 941 cifs_sb_source->mnt_cifs_flags &
938 CIFS_MOUNT_MAP_SPECIAL_CHR); 942 CIFS_MOUNT_MAP_SPECIAL_CHR);
939 if (rc==0) { 943 if (rc==0) {
940 CIFSSMBRenameOpenFile(xid, pTcon, netfid, toName, 944 rc = CIFSSMBRenameOpenFile(xid, pTcon, netfid, toName,
941 cifs_sb_source->local_nls, 945 cifs_sb_source->local_nls,
942 cifs_sb_source->mnt_cifs_flags & 946 cifs_sb_source->mnt_cifs_flags &
943 CIFS_MOUNT_MAP_SPECIAL_CHR); 947 CIFS_MOUNT_MAP_SPECIAL_CHR);
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index b5b0a2a41bef..ed18c3965f7b 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -896,6 +896,10 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
896 tmp_inode->i_ino,obj_type); 896 tmp_inode->i_ino,obj_type);
897 if(rc) { 897 if(rc) {
898 cFYI(1,("filldir rc = %d",rc)); 898 cFYI(1,("filldir rc = %d",rc));
899 /* we can not return filldir errors to the caller
900 since they are "normal" when the stat blocksize
901 is too small - we return remapped error instead */
902 rc = -EOVERFLOW;
899 } 903 }
900 904
901 dput(tmp_dentry); 905 dput(tmp_dentry);
@@ -1074,6 +1078,11 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
1074 we want to check for that here? */ 1078 we want to check for that here? */
1075 rc = cifs_filldir(current_entry, file, 1079 rc = cifs_filldir(current_entry, file,
1076 filldir, direntry, tmp_buf, max_len); 1080 filldir, direntry, tmp_buf, max_len);
1081 if(rc == -EOVERFLOW) {
1082 rc = 0;
1083 break;
1084 }
1085
1077 file->f_pos++; 1086 file->f_pos++;
1078 if(file->f_pos == 1087 if(file->f_pos ==
1079 cifsFile->srch_inf.index_of_last_entry) { 1088 cifsFile->srch_inf.index_of_last_entry) {