summaryrefslogtreecommitdiff
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2020-02-03 22:46:43 +0300
committerSteve French <stfrench@microsoft.com>2020-02-04 01:12:47 +0300
commit0f060936e490c6279dfe773d75d526d3d3d77111 (patch)
tree27cff51191e1b09aa70d96b7c14c96b36b18fc0d /fs/cifs/dir.c
parent94f2630b18975bb56eee5d1a36371db967643479 (diff)
downloadlinux-0f060936e490c6279dfe773d75d526d3d3d77111.tar.xz
SMB3: Backup intent flag missing from some more ops
When "backup intent" is requested on the mount (e.g. backupuid or backupgid mount options), the corresponding flag was missing from some of the operations. Change all operations to use the macro cifs_create_options() to set the backup intent flag if needed. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index f3b79012ff29..0ef099442f20 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -355,13 +355,10 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
if (!tcon->unix_ext && (mode & S_IWUGO) == 0)
create_options |= CREATE_OPTION_READONLY;
- if (backup_cred(cifs_sb))
- create_options |= CREATE_OPEN_BACKUP_INTENT;
-
oparms.tcon = tcon;
oparms.cifs_sb = cifs_sb;
oparms.desired_access = desired_access;
- oparms.create_options = create_options;
+ oparms.create_options = cifs_create_options(cifs_sb, create_options);
oparms.disposition = disposition;
oparms.path = full_path;
oparms.fid = fid;