diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 |
| commit | 944d79559d154c12becde0dab327016cf438f46c (patch) | |
| tree | 50c101806f4d3b6585222dda060559eb4f3e005a /fs/cifs/inode.c | |
| parent | d087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (diff) | |
| parent | 0f36b018b2e314d45af86449f1a97facb1fbe300 (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'fs/cifs/inode.c')
| -rw-r--r-- | fs/cifs/inode.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 411c1f7f84da..59359911f481 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -229,11 +229,12 @@ static int decode_sfu_inode(struct inode * inode, __u64 size, | |||
| 229 | cifs_sb->mnt_cifs_flags & | 229 | cifs_sb->mnt_cifs_flags & |
| 230 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 230 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| 231 | if (rc==0) { | 231 | if (rc==0) { |
| 232 | int buf_type = CIFS_NO_BUFFER; | ||
| 232 | /* Read header */ | 233 | /* Read header */ |
| 233 | rc = CIFSSMBRead(xid, pTcon, | 234 | rc = CIFSSMBRead(xid, pTcon, |
| 234 | netfid, | 235 | netfid, |
| 235 | 24 /* length */, 0 /* offset */, | 236 | 24 /* length */, 0 /* offset */, |
| 236 | &bytes_read, &pbuf); | 237 | &bytes_read, &pbuf, &buf_type); |
| 237 | if((rc == 0) && (bytes_read >= 8)) { | 238 | if((rc == 0) && (bytes_read >= 8)) { |
| 238 | if(memcmp("IntxBLK", pbuf, 8) == 0) { | 239 | if(memcmp("IntxBLK", pbuf, 8) == 0) { |
| 239 | cFYI(1,("Block device")); | 240 | cFYI(1,("Block device")); |
| @@ -267,7 +268,7 @@ static int decode_sfu_inode(struct inode * inode, __u64 size, | |||
| 267 | } else { | 268 | } else { |
| 268 | inode->i_mode |= S_IFREG; /* then it is a file */ | 269 | inode->i_mode |= S_IFREG; /* then it is a file */ |
| 269 | rc = -EOPNOTSUPP; /* or some unknown SFU type */ | 270 | rc = -EOPNOTSUPP; /* or some unknown SFU type */ |
| 270 | } | 271 | } |
| 271 | CIFSSMBClose(xid, pTcon, netfid); | 272 | CIFSSMBClose(xid, pTcon, netfid); |
| 272 | } | 273 | } |
| 273 | return rc; | 274 | return rc; |
| @@ -750,8 +751,8 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
| 750 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 751 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
| 751 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, | 752 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, |
| 752 | mode, | 753 | mode, |
| 753 | (__u64)current->euid, | 754 | (__u64)current->fsuid, |
| 754 | (__u64)current->egid, | 755 | (__u64)current->fsgid, |
| 755 | 0 /* dev_t */, | 756 | 0 /* dev_t */, |
| 756 | cifs_sb->local_nls, | 757 | cifs_sb->local_nls, |
| 757 | cifs_sb->mnt_cifs_flags & | 758 | cifs_sb->mnt_cifs_flags & |
| @@ -1040,9 +1041,9 @@ int cifs_revalidate(struct dentry *direntry) | |||
| 1040 | } | 1041 | } |
| 1041 | 1042 | ||
| 1042 | /* can not grab this sem since kernel filesys locking documentation | 1043 | /* can not grab this sem since kernel filesys locking documentation |
| 1043 | indicates i_sem may be taken by the kernel on lookup and rename | 1044 | indicates i_mutex may be taken by the kernel on lookup and rename |
| 1044 | which could deadlock if we grab the i_sem here as well */ | 1045 | which could deadlock if we grab the i_mutex here as well */ |
| 1045 | /* down(&direntry->d_inode->i_sem);*/ | 1046 | /* mutex_lock(&direntry->d_inode->i_mutex);*/ |
| 1046 | /* need to write out dirty pages here */ | 1047 | /* need to write out dirty pages here */ |
| 1047 | if (direntry->d_inode->i_mapping) { | 1048 | if (direntry->d_inode->i_mapping) { |
| 1048 | /* do we need to lock inode until after invalidate completes | 1049 | /* do we need to lock inode until after invalidate completes |
| @@ -1066,7 +1067,7 @@ int cifs_revalidate(struct dentry *direntry) | |||
| 1066 | } | 1067 | } |
| 1067 | } | 1068 | } |
| 1068 | } | 1069 | } |
| 1069 | /* up(&direntry->d_inode->i_sem); */ | 1070 | /* mutex_unlock(&direntry->d_inode->i_mutex); */ |
| 1070 | 1071 | ||
| 1071 | kfree(full_path); | 1072 | kfree(full_path); |
| 1072 | FreeXid(xid); | 1073 | FreeXid(xid); |
| @@ -1148,8 +1149,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
| 1148 | /* BB check if we need to refresh inode from server now ? BB */ | 1149 | /* BB check if we need to refresh inode from server now ? BB */ |
| 1149 | 1150 | ||
| 1150 | /* need to flush data before changing file size on server */ | 1151 | /* need to flush data before changing file size on server */ |
| 1151 | filemap_fdatawrite(direntry->d_inode->i_mapping); | 1152 | filemap_write_and_wait(direntry->d_inode->i_mapping); |
| 1152 | filemap_fdatawait(direntry->d_inode->i_mapping); | ||
| 1153 | 1153 | ||
| 1154 | if (attrs->ia_valid & ATTR_SIZE) { | 1154 | if (attrs->ia_valid & ATTR_SIZE) { |
| 1155 | /* To avoid spurious oplock breaks from server, in the case of | 1155 | /* To avoid spurious oplock breaks from server, in the case of |
