diff mbox series

smb3: set COMPOUND_FID to FileID field of subsequent compound request

Message ID 20201203033136.16375-1-namjae.jeon@samsung.com (mailing list archive)
State New, archived
Headers show
Series smb3: set COMPOUND_FID to FileID field of subsequent compound request | expand

Commit Message

Namjae Jeon Dec. 3, 2020, 3:31 a.m. UTC
For an operation compounded with an SMB2 CREATE request, client must set
COMPOUND_FID(0xFFFFFFFFFFFFFFFF) to FileID field of smb2 ioctl.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
---
 fs/cifs/smb2ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Aurélien Aptel Dec. 3, 2020, 3:50 p.m. UTC | #1
Hi,

Namjae Jeon <namjae.jeon@samsung.com> writes:
> For an operation compounded with an SMB2 CREATE request, client must set
> COMPOUND_FID(0xFFFFFFFFFFFFFFFF) to FileID field of smb2 ioctl.

Looks good to me.

Reviewed-by: Aurelien Aptel <aaptel@suse.com>

Cheers,
ronnie sahlberg Dec. 3, 2020, 9:23 p.m. UTC | #2
Looks good to me,
please add "Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>"

(How could this ever have worked?)


Can you add a line :
Fixes: 2e4564b31b645 ("smb3: add support ....

On Thu, Dec 3, 2020 at 1:38 PM Namjae Jeon <namjae.jeon@samsung.com> wrote:
>
> For an operation compounded with an SMB2 CREATE request, client must set
> COMPOUND_FID(0xFFFFFFFFFFFFFFFF) to FileID field of smb2 ioctl.
>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> ---
>  fs/cifs/smb2ops.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 504766cb6c19..3ca632bb6be9 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -3098,8 +3098,8 @@ smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon,
>         rqst[1].rq_nvec = SMB2_IOCTL_IOV_SIZE;
>
>         rc = SMB2_ioctl_init(tcon, server,
> -                            &rqst[1], fid.persistent_fid,
> -                            fid.volatile_fid, FSCTL_GET_REPARSE_POINT,
> +                            &rqst[1], COMPOUND_FID,
> +                            COMPOUND_FID, FSCTL_GET_REPARSE_POINT,
>                              true /* is_fctl */, NULL, 0,
>                              CIFSMaxBufSize -
>                              MAX_SMB2_CREATE_RESPONSE_SIZE -
> --
> 2.17.1
>
Steve French Dec. 3, 2020, 11:05 p.m. UTC | #3
updated ... also just noticed that no need for cc:stable since this
was added after 5.9

On Thu, Dec 3, 2020 at 3:23 PM ronnie sahlberg <ronniesahlberg@gmail.com> wrote:
>
> Looks good to me,
> please add "Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>"
>
> (How could this ever have worked?)
>
>
> Can you add a line :
> Fixes: 2e4564b31b645 ("smb3: add support ....
>
> On Thu, Dec 3, 2020 at 1:38 PM Namjae Jeon <namjae.jeon@samsung.com> wrote:
> >
> > For an operation compounded with an SMB2 CREATE request, client must set
> > COMPOUND_FID(0xFFFFFFFFFFFFFFFF) to FileID field of smb2 ioctl.
> >
> > Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> > ---
> >  fs/cifs/smb2ops.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> > index 504766cb6c19..3ca632bb6be9 100644
> > --- a/fs/cifs/smb2ops.c
> > +++ b/fs/cifs/smb2ops.c
> > @@ -3098,8 +3098,8 @@ smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon,
> >         rqst[1].rq_nvec = SMB2_IOCTL_IOV_SIZE;
> >
> >         rc = SMB2_ioctl_init(tcon, server,
> > -                            &rqst[1], fid.persistent_fid,
> > -                            fid.volatile_fid, FSCTL_GET_REPARSE_POINT,
> > +                            &rqst[1], COMPOUND_FID,
> > +                            COMPOUND_FID, FSCTL_GET_REPARSE_POINT,
> >                              true /* is_fctl */, NULL, 0,
> >                              CIFSMaxBufSize -
> >                              MAX_SMB2_CREATE_RESPONSE_SIZE -
> > --
> > 2.17.1
> >
diff mbox series

Patch

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 504766cb6c19..3ca632bb6be9 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -3098,8 +3098,8 @@  smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon,
 	rqst[1].rq_nvec = SMB2_IOCTL_IOV_SIZE;
 
 	rc = SMB2_ioctl_init(tcon, server,
-			     &rqst[1], fid.persistent_fid,
-			     fid.volatile_fid, FSCTL_GET_REPARSE_POINT,
+			     &rqst[1], COMPOUND_FID,
+			     COMPOUND_FID, FSCTL_GET_REPARSE_POINT,
 			     true /* is_fctl */, NULL, 0,
 			     CIFSMaxBufSize -
 			     MAX_SMB2_CREATE_RESPONSE_SIZE -