OSDN Git Service

SMB3: Backup intent flag missing from compounded ops
authorSteve French <stfrench@microsoft.com>
Tue, 28 Aug 2018 21:14:21 +0000 (16:14 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Oct 2018 02:16:04 +0000 (21:16 -0500)
When "backup intent" is requested on the mount (e.g. backupuid or
backupgid mount options), the corresponding flag was missing from
some of the new compounding operations as well (now that
open_query_close is gone).

Related to kernel bugzilla #200953

Reported-and-tested-by: <whh@rubrik.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/smb2inode.c

index 247cc0b..c0b3622 100644 (file)
@@ -83,6 +83,8 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
        oparms.desired_access = desired_access;
        oparms.disposition = create_disposition;
        oparms.create_options = create_options;
+       if (backup_cred(cifs_sb))
+               oparms.create_options |= CREATE_OPEN_BACKUP_INTENT;
        oparms.fid = &fid;
        oparms.reconnect = false;