summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-07-18 23:21:09 +0000
committerSteve French <sfrench@us.ibm.com>2007-07-18 23:21:09 +0000
commitc18c842b1fdf527717303a4e173cbece7ab2deb8 (patch)
treeb400ad6d711b8474a0516220c98d390d56c508de /fs/cifs/inode.c
parent63135e088a604b955746c51964c195c8d3ebac11 (diff)
downloadblackbird-op-linux-c18c842b1fdf527717303a4e173cbece7ab2deb8.tar.gz
blackbird-op-linux-c18c842b1fdf527717303a4e173cbece7ab2deb8.zip
[CIFS] Allow disabling CIFS Unix Extensions as mount option
Previously the only way to do this was to umount all mounts to that server, turn off a proc setting (/proc/fs/cifs/LinuxExtensionsEnabled). Fixes Samba bugzilla bug number: 4582 (and also 2008) Signed-off-by: Steve French <sfrench@us.ibm.com>
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)
cifs_sb = CIFS_SB(inode->i_sb);
xid = GetXid();
- if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
+
+ if (cifs_sb->tcon->unix_ext)
cifs_get_inode_info_unix(&inode, "", inode->i_sb, xid);
else
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)
} else {
mkdir_get_info:
inc_nlink(inode);
- if (pTcon->ses->capabilities & CAP_UNIX)
+ if (pTcon->unix_ext)
rc = cifs_get_inode_info_unix(&newinode, full_path,
inode->i_sb, xid);
else
@@ -997,7 +998,7 @@ mkdir_get_info:
* failed to get it from the server or was set bogus */
if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2))
direntry->d_inode->i_nlink = 2;
- if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) {
+ if (pTcon->unix_ext) {
mode &= ~current->fs->umask;
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
CIFSSMBUnixSetPerms(xid, pTcon, full_path,
@@ -1130,7 +1131,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL);
if (info_buf_source != NULL) {
info_buf_target = info_buf_source + 1;
- if (pTcon->ses->capabilities & CAP_UNIX)
+ if (pTcon->unix_ext)
rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
info_buf_source,
cifs_sb_source->local_nls,
@@ -1258,7 +1259,7 @@ int cifs_revalidate(struct dentry *direntry)
local_mtime = direntry->d_inode->i_mtime;
local_size = direntry->d_inode->i_size;
- if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) {
+ if (cifs_sb->tcon->unix_ext) {
rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path,
direntry->d_sb, xid);
if (rc) {
@@ -1542,7 +1543,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
mode = attrs->ia_mode;
}
- if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX)
+ if ((pTcon->unix_ext)
&& (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID)))
rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid,
0 /* dev_t */, cifs_sb->local_nls,
OpenPOWER on IntegriCloud