| |
| |
| |
| @@ -61,6 +61,9 @@ |
| oparms->desired_access |= FILE_READ_ATTRIBUTES; |
| smb2_oplock = SMB2_OPLOCK_LEVEL_BATCH; |
| |
| + if (backup_cred(oparms->cifs_sb)) |
| + oparms->create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL); |
| if (rc) |
| goto out; |
| |
| |
| @@ -60,6 +60,9 @@ |
| oparms.fid = &fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL); |
| if (rc) { |
| kfree(utf16_path); |
| |
| |
| @@ -385,6 +385,9 @@ |
| oparms.fid = &fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL); |
| if (rc) { |
| kfree(utf16_path); |
| @@ -535,6 +538,9 @@ |
| oparms.fid = &fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL); |
| kfree(utf16_path); |
| if (rc) { |
| @@ -614,6 +620,9 @@ |
| oparms.fid = &fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL); |
| kfree(utf16_path); |
| if (rc) { |
| @@ -1192,6 +1201,9 @@ |
| oparms.fid = fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL); |
| kfree(utf16_path); |
| if (rc) { |
| @@ -1465,6 +1477,9 @@ |
| oparms.fid = &fid; |
| oparms.reconnect = false; |
| |
| + if (backup_cred(cifs_sb)) |
| + oparms.create_options |= CREATE_OPEN_BACKUP_INTENT; |
| + |
| rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, &err_buf); |
| |
| if (!rc || !err_buf) { |