cifs: update desired access while requesting for directory lease
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- fs/smb/client/cached_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/cached_dir.c +1 -1
@@ -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, };
Signature · 1 line
2.39.2
Quoted 24 lines · Bharath SM
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 <[email protected]>--- fs/smb/client/cached_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/smb/client/cached_dir.c +1
-2@@ -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, }; --
Quoted 2 lines
2.39.2
Looks good to me.
Should also CC stable.
Reviewed-by Shyam Prasad N <[email protected]>
Signature · 2 lines
Regards, Shyam
Adding [email protected]
Quoted 37 lines · Shyam Prasad N
Quoted 24 lines · Bharath SM
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 <[email protected]>--- fs/smb/client/cached_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/smb/client/cached_dir.c +1
-2@@ -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, }; --Quoted 2 lines
2.39.2
Looks good to me.
Should also CC stable.Reviewed-by Shyam Prasad N <[email protected]>--
Regards,
Shyam