aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-12-01 04:56:43 -0500
commitbd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch)
tree3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /fs/cifs/inode.c
parent6c33cafc794d07c9254c160789120a0e98c088c9 (diff)
parent0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 35d54bb0869a..1ad8c9fcc742 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);
@@ -1085,8 +1089,10 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
1085 struct kstat *stat) 1089 struct kstat *stat)
1086{ 1090{
1087 int err = cifs_revalidate(dentry); 1091 int err = cifs_revalidate(dentry);
1088 if (!err) 1092 if (!err) {
1089 generic_fillattr(dentry->d_inode, stat); 1093 generic_fillattr(dentry->d_inode, stat);
1094 stat->blksize = CIFS_MAX_MSGSIZE;
1095 }
1090 return err; 1096 return err;
1091} 1097}
1092 1098