Skip to content

Commit

Permalink
ksmbd: remove duplicate flag set in smb2_write
Browse files Browse the repository at this point in the history
The writethrough flag is set again if is_rdma_channel is false.

Signed-off-by: Hyunchul Lee <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
hclee authored and namjaejeon committed Jun 14, 2022
1 parent 2b83b2e commit 9ef42e9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6577,6 +6577,7 @@ int smb2_write(struct ksmbd_work *work)
goto out;
}

ksmbd_debug(SMB, "flags %u\n", le32_to_cpu(req->Flags));
if (le32_to_cpu(req->Flags) & SMB2_WRITEFLAG_WRITE_THROUGH)
writethrough = true;

Expand All @@ -6592,10 +6593,6 @@ int smb2_write(struct ksmbd_work *work)
data_buf = (char *)(((char *)&req->hdr.ProtocolId) +
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,
Expand Down

0 comments on commit 9ef42e9

Please sign in to comment.