smb3: Fix mode on mkdir on smb311 mounts
mkdir was not passing the mode on smb3.11 mounts with posix extensions Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
@@ -1575,6 +1575,17 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode)
|
||||
goto mkdir_out;
|
||||
}
|
||||
|
||||
server = tcon->ses->server;
|
||||
|
||||
#ifdef CONFIG_CIFS_SMB311
|
||||
if ((server->ops->posix_mkdir) && (tcon->posix_extensions)) {
|
||||
rc = server->ops->posix_mkdir(xid, inode, mode, tcon, full_path,
|
||||
cifs_sb);
|
||||
d_drop(direntry); /* for time being always refresh inode info */
|
||||
goto mkdir_out;
|
||||
}
|
||||
#endif /* SMB311 */
|
||||
|
||||
if (cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &
|
||||
le64_to_cpu(tcon->fsUnixInfo.Capability))) {
|
||||
rc = cifs_posix_mkdir(inode, direntry, mode, full_path, cifs_sb,
|
||||
@@ -1583,8 +1594,6 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, umode_t mode)
|
||||
goto mkdir_out;
|
||||
}
|
||||
|
||||
server = tcon->ses->server;
|
||||
|
||||
if (!server->ops->mkdir) {
|
||||
rc = -ENOSYS;
|
||||
goto mkdir_out;
|
||||
|
Reference in New Issue
Block a user