]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: Do not add FILE_READ_ATTRIBUTES when using GENERIC_READ/EXECUTE/ALL
authorPali Rohár <pali@kernel.org>
Sun, 22 Dec 2024 16:58:21 +0000 (17:58 +0100)
committerSteve French <stfrench@microsoft.com>
Tue, 1 Apr 2025 09:58:09 +0000 (04:58 -0500)
commite97aec7889543663202e24ec51e1e2f9cb236472
treee884da962f646c78db28dd1b07c2fc961db2577e
parentb07687edee99b9e53465fbd7f24406616f67070e
cifs: Do not add FILE_READ_ATTRIBUTES when using GENERIC_READ/EXECUTE/ALL

Individual bits GENERIC_READ, GENERIC_EXECUTE and GENERIC_ALL have meaning
which includes also access right for FILE_READ_ATTRIBUTES. So specifying
FILE_READ_ATTRIBUTES bit together with one of those GENERIC (except
GENERIC_WRITE) does not do anything.

This change prevents calling additional (fallback) code and sending more
requests without FILE_READ_ATTRIBUTES when the primary request fails on
-EACCES, as it is not needed at all.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2file.c