Message ID | 20230816202638.17616-1-bharathsm@microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cifs: update desired access while requesting for directory lease | expand |
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>
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
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, };
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(-)