Re: [PATCH] cifs: update desired access while requesting for directory lease

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adding smfrench@xxxxxxxxx

On Thu, Aug 17, 2023 at 3:12 PM Shyam Prasad N <nspmangalore@xxxxxxxxx> wrote:
>
> On Thu, Aug 17, 2023 at 1:58 AM Bharath SM <bharathsm.hsk@xxxxxxxxx> 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@xxxxxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxxxx>
>
> --
> Regards,
> Shyam




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux