summaryrefslogtreecommitdiff
path: root/fs/ksmbd/transport_rdma.h
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2022-05-16 16:23:28 +0900
committerSteve French <stfrench@microsoft.com>2022-05-21 15:01:43 -0500
commit7a84399e1ce3f5f2fbec3e7dd93459ba25badc2f (patch)
treea625800ad360f10a2961058406373e35999d0707 /fs/ksmbd/transport_rdma.h
parent65bb45b97b578c8eed1ffa80caec84708df49729 (diff)
downloadlwn-7a84399e1ce3f5f2fbec3e7dd93459ba25badc2f.tar.gz
lwn-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.h')
-rw-r--r--fs/ksmbd/transport_rdma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ksmbd/transport_rdma.h b/fs/ksmbd/transport_rdma.h
index e7b4e6790fab..77aee4e5c9dc 100644
--- a/fs/ksmbd/transport_rdma.h
+++ b/fs/ksmbd/transport_rdma.h
@@ -57,11 +57,13 @@ int ksmbd_rdma_init(void);
void ksmbd_rdma_destroy(void);
bool ksmbd_rdma_capable_netdev(struct net_device *netdev);
void init_smbd_max_io_size(unsigned int sz);
+unsigned int get_smbd_max_read_write_size(void);
#else
static inline int ksmbd_rdma_init(void) { return 0; }
static inline int ksmbd_rdma_destroy(void) { return 0; }
static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; }
static inline void init_smbd_max_io_size(unsigned int sz) { }
+static inline unsigned int get_smbd_max_read_write_size(void) { return 0; }
#endif
#endif /* __KSMBD_TRANSPORT_RDMA_H__ */