aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 3482879b3d3f..dd4167762a8e 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -583,7 +583,8 @@ void cifs_read_inode(struct inode *inode)
583 583
584 cifs_sb = CIFS_SB(inode->i_sb); 584 cifs_sb = CIFS_SB(inode->i_sb);
585 xid = GetXid(); 585 xid = GetXid();
586 if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) 586
587 if (cifs_sb->tcon->unix_ext)
587 cifs_get_inode_info_unix(&inode, "", inode->i_sb, xid); 588 cifs_get_inode_info_unix(&inode, "", inode->i_sb, xid);
588 else 589 else
589 cifs_get_inode_info(&inode, "", NULL, inode->i_sb, xid); 590 cifs_get_inode_info(&inode, "", NULL, inode->i_sb, xid);
@@ -981,7 +982,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
981 } else { 982 } else {
982mkdir_get_info: 983mkdir_get_info:
983 inc_nlink(inode); 984 inc_nlink(inode);
984 if (pTcon->ses->capabilities & CAP_UNIX) 985 if (pTcon->unix_ext)
985 rc = cifs_get_inode_info_unix(&newinode, full_path, 986 rc = cifs_get_inode_info_unix(&newinode, full_path,
986 inode->i_sb, xid); 987 inode->i_sb, xid);
987 else 988 else
@@ -997,7 +998,7 @@ mkdir_get_info:
997 * failed to get it from the server or was set bogus */ 998 * failed to get it from the server or was set bogus */
998 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2)) 999 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2))
999 direntry->d_inode->i_nlink = 2; 1000 direntry->d_inode->i_nlink = 2;
1000 if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) { 1001 if (pTcon->unix_ext) {
1001 mode &= ~current->fs->umask; 1002 mode &= ~current->fs->umask;
1002 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 1003 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
1003 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 1004 CIFSSMBUnixSetPerms(xid, pTcon, full_path,
@@ -1130,7 +1131,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
1130 kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); 1131 kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL);
1131 if (info_buf_source != NULL) { 1132 if (info_buf_source != NULL) {
1132 info_buf_target = info_buf_source + 1; 1133 info_buf_target = info_buf_source + 1;
1133 if (pTcon->ses->capabilities & CAP_UNIX) 1134 if (pTcon->unix_ext)
1134 rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName, 1135 rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
1135 info_buf_source, 1136 info_buf_source,
1136 cifs_sb_source->local_nls, 1137 cifs_sb_source->local_nls,
@@ -1258,7 +1259,7 @@ int cifs_revalidate(struct dentry *direntry)
1258 local_mtime = direntry->d_inode->i_mtime; 1259 local_mtime = direntry->d_inode->i_mtime;
1259 local_size = direntry->d_inode->i_size; 1260 local_size = direntry->d_inode->i_size;
1260 1261
1261 if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) { 1262 if (cifs_sb->tcon->unix_ext) {
1262 rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path, 1263 rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path,
1263 direntry->d_sb, xid); 1264 direntry->d_sb, xid);
1264 if (rc) { 1265 if (rc) {
@@ -1542,7 +1543,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1542 mode = attrs->ia_mode; 1543 mode = attrs->ia_mode;
1543 } 1544 }
1544 1545
1545 if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) 1546 if ((pTcon->unix_ext)
1546 && (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID))) 1547 && (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID)))
1547 rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid, 1548 rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid,
1548 0 /* dev_t */, cifs_sb->local_nls, 1549 0 /* dev_t */, cifs_sb->local_nls,