diff mbox series

[1/2] ksmbd: remove duplicate flag set in smb2_write

Message ID 20220613230119.73475-1-hyc.lee@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ksmbd: remove duplicate flag set in smb2_write | expand

Commit Message

Hyunchul Lee June 13, 2022, 11:01 p.m. UTC
The writethrough flag is set again if
is_rdma_channel is false.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
---
 fs/ksmbd/smb2pdu.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Namjae Jeon June 13, 2022, 11:08 p.m. UTC | #1
2022-06-14 8:01 GMT+09:00, Hyunchul Lee <hyc.lee@gmail.com>:
> The writethrough flag is set again if
> is_rdma_channel is false.
>
> Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
> ---
>  fs/ksmbd/smb2pdu.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
> index e6f4ccc12f49..553aad4ca6fa 100644
> --- a/fs/ksmbd/smb2pdu.c
> +++ b/fs/ksmbd/smb2pdu.c
> @@ -6506,9 +6506,6 @@ int smb2_write(struct ksmbd_work *work)
>  				    le16_to_cpu(req->DataOffset));
>
>  		ksmbd_debug(SMB, "flags %u\n", le32_to_cpu(req->Flags));
Could you move debug print to flags check above also ?

> -		if (le32_to_cpu(req->Flags) & SMB2_WRITEFLAG_WRITE_THROUGH)
> -			writethrough = true;
> -
>  		ksmbd_debug(SMB, "filename %pd, offset %lld, len %zu\n",
>  			    fp->filp->f_path.dentry, offset, length);
>  		err = ksmbd_vfs_write(work, fp, data_buf, length, &offset,
> --
> 2.25.1
>
>
Hyunchul Lee June 13, 2022, 11:12 p.m. UTC | #2
2022년 6월 14일 (화) 오전 8:08, Namjae Jeon <linkinjeon@kernel.org>님이 작성:
>
> 2022-06-14 8:01 GMT+09:00, Hyunchul Lee <hyc.lee@gmail.com>:
> > The writethrough flag is set again if
> > is_rdma_channel is false.
> >
> > Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
> > ---
> >  fs/ksmbd/smb2pdu.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
> > index e6f4ccc12f49..553aad4ca6fa 100644
> > --- a/fs/ksmbd/smb2pdu.c
> > +++ b/fs/ksmbd/smb2pdu.c
> > @@ -6506,9 +6506,6 @@ int smb2_write(struct ksmbd_work *work)
> >                                   le16_to_cpu(req->DataOffset));
> >
> >               ksmbd_debug(SMB, "flags %u\n", le32_to_cpu(req->Flags));
> Could you move debug print to flags check above also ?
>

Okay, I will.

> > -             if (le32_to_cpu(req->Flags) & SMB2_WRITEFLAG_WRITE_THROUGH)
> > -                     writethrough = true;
> > -
> >               ksmbd_debug(SMB, "filename %pd, offset %lld, len %zu\n",
> >                           fp->filp->f_path.dentry, offset, length);
> >               err = ksmbd_vfs_write(work, fp, data_buf, length, &offset,
> > --
> > 2.25.1
> >
> >
diff mbox series

Patch

diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index e6f4ccc12f49..553aad4ca6fa 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -6506,9 +6506,6 @@  int smb2_write(struct ksmbd_work *work)
 				    le16_to_cpu(req->DataOffset));
 
 		ksmbd_debug(SMB, "flags %u\n", le32_to_cpu(req->Flags));
-		if (le32_to_cpu(req->Flags) & SMB2_WRITEFLAG_WRITE_THROUGH)
-			writethrough = true;
-
 		ksmbd_debug(SMB, "filename %pd, offset %lld, len %zu\n",
 			    fp->filp->f_path.dentry, offset, length);
 		err = ksmbd_vfs_write(work, fp, data_buf, length, &offset,