diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index def89f23fe55..4830acc86d74 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -207,8 +207,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
207 | } else { | 207 | } else { |
208 | /* If Open reported that we actually created a file | 208 | /* If Open reported that we actually created a file |
209 | then we now have to set the mode if possible */ | 209 | then we now have to set the mode if possible */ |
210 | if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) && | 210 | if ((pTcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) { |
211 | (oplock & CIFS_CREATE_ACTION)) { | ||
212 | mode &= ~current->fs->umask; | 211 | mode &= ~current->fs->umask; |
213 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 212 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
214 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, | 213 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, |
@@ -235,8 +234,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
235 | /* Could set r/o dos attribute if mode & 0222 == 0 */ | 234 | /* Could set r/o dos attribute if mode & 0222 == 0 */ |
236 | } | 235 | } |
237 | 236 | ||
238 | /* BB server might mask mode so we have to query for Unix case*/ | 237 | /* server might mask mode so we have to query for it */ |
239 | if (pTcon->ses->capabilities & CAP_UNIX) | 238 | if (pTcon->unix_ext) |
240 | rc = cifs_get_inode_info_unix(&newinode, full_path, | 239 | rc = cifs_get_inode_info_unix(&newinode, full_path, |
241 | inode->i_sb, xid); | 240 | inode->i_sb, xid); |
242 | else { | 241 | else { |
@@ -337,7 +336,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
337 | full_path = build_path_from_dentry(direntry); | 336 | full_path = build_path_from_dentry(direntry); |
338 | if (full_path == NULL) | 337 | if (full_path == NULL) |
339 | rc = -ENOMEM; | 338 | rc = -ENOMEM; |
340 | else if (pTcon->ses->capabilities & CAP_UNIX) { | 339 | else if (pTcon->unix_ext) { |
341 | mode &= ~current->fs->umask; | 340 | mode &= ~current->fs->umask; |
342 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 341 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
343 | rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, | 342 | rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, |
@@ -491,7 +490,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
491 | cFYI(1, | 490 | cFYI(1, |
492 | (" Full path: %s inode = 0x%p", full_path, direntry->d_inode)); | 491 | (" Full path: %s inode = 0x%p", full_path, direntry->d_inode)); |
493 | 492 | ||
494 | if (pTcon->ses->capabilities & CAP_UNIX) | 493 | if (pTcon->unix_ext) |
495 | rc = cifs_get_inode_info_unix(&newInode, full_path, | 494 | rc = cifs_get_inode_info_unix(&newInode, full_path, |
496 | parent_dir_inode->i_sb, xid); | 495 | parent_dir_inode->i_sb, xid); |
497 | else | 496 | else |