summaryrefslogtreecommitdiffstats
path: root/fs/smb
diff options
context:
space:
mode:
authorBharath SM <bharathsm@microsoft.com>2023-08-16 21:38:45 +0200
committerSteve French <stfrench@microsoft.com>2023-08-22 17:31:00 +0200
commitb6d44d42313baa45a81ce9b299aeee2ccf3d0ee1 (patch)
treea84732d217b313f514f4aa14cb7669667b71f254 /fs/smb
parentsmb: client: reduce stack usage in smb2_query_reparse_point() (diff)
downloadlinux-b6d44d42313baa45a81ce9b299aeee2ccf3d0ee1.tar.xz
linux-b6d44d42313baa45a81ce9b299aeee2ccf3d0ee1.zip
cifs: update desired access while requesting for directory lease
We read and cache directory contents when we get directory lease, so we should ask for read permission to read contents of directory. Signed-off-by: Bharath SM <bharathsm@microsoft.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb')
-rw-r--r--fs/smb/client/cached_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index fe483f163dbc..2d5e9a9d5b8b 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -218,7 +218,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
.tcon = tcon,
.path = path,
.create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE),
- .desired_access = FILE_READ_ATTRIBUTES,
+ .desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES,
.disposition = FILE_OPEN,
.fid = pfid,
};