Skip to content

Commit ddecea0

Browse files
Paulo Alcantarasmfrench
authored andcommitted
smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp
NetApp server requires the file to be open with FILE_READ_EA access in order to support FSCTL_GET_REPARSE_POINT, otherwise it will return STATUS_INVALID_DEVICE_REQUEST. It doesn't make any sense because there's no requirement for FILE_READ_EA bit to be set nor STATUS_INVALID_DEVICE_REQUEST being used for something other than "unsupported reparse points" in MS-FSA. To fix it and improve compatibility, set FILE_READ_EA & SYNCHRONIZE bits to match what Windows client currently does. Tested-by: Sebastian Steinbeisser <[email protected]> Acked-by: Tom Talpey <[email protected]> Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 69ca1f5 commit ddecea0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/smb/client/smb2inode.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ int smb2_query_path_info(const unsigned int xid,
950950
cmds[num_cmds++] = SMB2_OP_GET_REPARSE;
951951

952952
oparms = CIFS_OPARMS(cifs_sb, tcon, full_path,
953-
FILE_READ_ATTRIBUTES | FILE_READ_EA,
953+
FILE_READ_ATTRIBUTES |
954+
FILE_READ_EA | SYNCHRONIZE,
954955
FILE_OPEN, create_options |
955956
OPEN_REPARSE_POINT, ACL_NO_MODE);
956957
cifs_get_readable_path(tcon, full_path, &cfile);
@@ -1258,7 +1259,8 @@ int smb2_query_reparse_point(const unsigned int xid,
12581259
cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path);
12591260

12601261
cifs_get_readable_path(tcon, full_path, &cfile);
1261-
oparms = CIFS_OPARMS(cifs_sb, tcon, full_path, FILE_READ_ATTRIBUTES,
1262+
oparms = CIFS_OPARMS(cifs_sb, tcon, full_path,
1263+
FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE,
12621264
FILE_OPEN, OPEN_REPARSE_POINT, ACL_NO_MODE);
12631265
rc = smb2_compound_op(xid, tcon, cifs_sb,
12641266
full_path, &oparms, &in_iov,

0 commit comments

Comments
 (0)