diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2022-05-16 09:23:28 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-05-21 22:01:43 +0200 |
commit | 7a84399e1ce3f5f2fbec3e7dd93459ba25badc2f (patch) | |
tree | a625800ad360f10a2961058406373e35999d0707 /fs/ksmbd/transport_rdma.c | |
parent | ksmbd: add smbd max io size parameter (diff) | |
download | linux-7a84399e1ce3f5f2fbec3e7dd93459ba25badc2f.tar.xz linux-7a84399e1ce3f5f2fbec3e7dd93459ba25badc2f.zip |
ksmbd: fix wrong smbd max read/write size check
smb-direct max read/write size can be different with smb2 max read/write
size. So smb2_read() can return error by wrong max read/write size check.
This patch use smb_direct_max_read_write_size for this check in
smb-direct read/write().
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/transport_rdma.c')
-rw-r--r-- | fs/ksmbd/transport_rdma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c index 6d652ff38b82..0741fd129d16 100644 --- a/fs/ksmbd/transport_rdma.c +++ b/fs/ksmbd/transport_rdma.c @@ -220,6 +220,11 @@ void init_smbd_max_io_size(unsigned int sz) smb_direct_max_read_write_size = sz; } +unsigned int get_smbd_max_read_write_size(void) +{ + return smb_direct_max_read_write_size; +} + static inline int get_buf_page_count(void *buf, int size) { return DIV_ROUND_UP((uintptr_t)buf + size, PAGE_SIZE) - |