* [PATCH] cifs: update desired access while requesting for directory lease
@ 2023-08-16 20:26 Bharath SM
2023-08-17 9:42 ` Shyam Prasad N
0 siblings, 1 reply; 3+ messages in thread
From: Bharath SM @ 2023-08-16 20:26 UTC (permalink / raw)
To: pc, sfrench, nspmangalore, sprasad, tom, linux-cifs, bharathsm
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>
---
fs/smb/client/cached_dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: update desired access while requesting for directory lease
2023-08-16 20:26 [PATCH] cifs: update desired access while requesting for directory lease Bharath SM
@ 2023-08-17 9:42 ` Shyam Prasad N
2023-08-22 15:09 ` Bharath SM
0 siblings, 1 reply; 3+ messages in thread
From: Shyam Prasad N @ 2023-08-17 9:42 UTC (permalink / raw)
To: Bharath SM; +Cc: pc, sfrench, sprasad, tom, linux-cifs, bharathsm
On Thu, Aug 17, 2023 at 1:58 AM Bharath SM <bharathsm.hsk@gmail.com> wrote:
>
> 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>
> ---
> fs/smb/client/cached_dir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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,
> };
> --
> 2.39.2
>
Looks good to me.
Should also CC stable.
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
--
Regards,
Shyam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: update desired access while requesting for directory lease
2023-08-17 9:42 ` Shyam Prasad N
@ 2023-08-22 15:09 ` Bharath SM
0 siblings, 0 replies; 3+ messages in thread
From: Bharath SM @ 2023-08-22 15:09 UTC (permalink / raw)
To: Shyam Prasad N, Steve French
Cc: pc, sfrench, sprasad, tom, linux-cifs, bharathsm
Adding smfrench@gmail.com
On Thu, Aug 17, 2023 at 3:12 PM Shyam Prasad N <nspmangalore@gmail.com> wrote:
>
> On Thu, Aug 17, 2023 at 1:58 AM Bharath SM <bharathsm.hsk@gmail.com> wrote:
> >
> > 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>
> > ---
> > fs/smb/client/cached_dir.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > 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,
> > };
> > --
> > 2.39.2
> >
>
> Looks good to me.
> Should also CC stable.
>
> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
>
> --
> Regards,
> Shyam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-22 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 20:26 [PATCH] cifs: update desired access while requesting for directory lease Bharath SM
2023-08-17 9:42 ` Shyam Prasad N
2023-08-22 15:09 ` Bharath SM
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox