This is a note to let you know that I've just added the patch titled ksmbd: smbd: introduce read/write credits for RDMA read/write to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ksmbd-smbd-introduce-read-write-credits-for-rdma-read-write.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From linkinjeon@xxxxxxxxx Mon Dec 18 16:37:13 2023 From: Namjae Jeon <linkinjeon@xxxxxxxxxx> Date: Tue, 19 Dec 2023 00:32:54 +0900 Subject: ksmbd: smbd: introduce read/write credits for RDMA read/write To: gregkh@xxxxxxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx Cc: smfrench@xxxxxxxxx, Hyunchul Lee <hyc.lee@xxxxxxxxx>, Namjae Jeon <linkinjeon@xxxxxxxxxx>, Steve French <stfrench@xxxxxxxxxxxxx> Message-ID: <20231218153454.8090-35-linkinjeon@xxxxxxxxxx> From: Hyunchul Lee <hyc.lee@xxxxxxxxx> [ Upstream commit ddbdc861e37c168cf2fb8a7b7477f5d18b4daf76 ] SMB2_READ/SMB2_WRITE request has to be granted the number of rw credits, the pages the request wants to transfer / the maximum pages which can be registered with one MR to read and write a file. And allocate enough RDMA resources for the maximum number of rw credits allowed by ksmbd. Signed-off-by: Hyunchul Lee <hyc.lee@xxxxxxxxx> Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/transport_rdma.c | 118 +++++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 48 deletions(-) --- a/fs/ksmbd/transport_rdma.c +++ b/fs/ksmbd/transport_rdma.c @@ -82,8 +82,6 @@ static int smb_direct_max_receive_size = static int smb_direct_max_read_write_size = SMBD_DEFAULT_IOSIZE; -static int smb_direct_max_outstanding_rw_ops = 8; - static LIST_HEAD(smb_direct_device_list); static DEFINE_RWLOCK(smb_direct_device_lock); @@ -147,10 +145,12 @@ struct smb_direct_transport { atomic_t send_credits; spinlock_t lock_new_recv_credits; int new_recv_credits; - atomic_t rw_avail_ops; + int max_rw_credits; + int pages_per_rw_credit; + atomic_t rw_credits; wait_queue_head_t wait_send_credits; - wait_queue_head_t wait_rw_avail_ops; + wait_queue_head_t wait_rw_credits; mempool_t *sendmsg_mempool; struct kmem_cache *sendmsg_cache; @@ -383,7 +383,7 @@ static struct smb_direct_transport *allo t->reassembly_queue_length = 0; init_waitqueue_head(&t->wait_reassembly_queue); init_waitqueue_head(&t->wait_send_credits); - init_waitqueue_head(&t->wait_rw_avail_ops); + init_waitqueue_head(&t->wait_rw_credits); spin_lock_init(&t->receive_credit_lock); spin_lock_init(&t->recvmsg_queue_lock); @@ -989,18 +989,19 @@ static int smb_direct_flush_send_list(st } static int wait_for_credits(struct smb_direct_transport *t, - wait_queue_head_t *waitq, atomic_t *credits) + wait_queue_head_t *waitq, atomic_t *total_credits, + int needed) { int ret; do { - if (atomic_dec_return(credits) >= 0) + if (atomic_sub_return(needed, total_credits) >= 0) return 0; - atomic_inc(credits); + atomic_add(needed, total_credits); ret = wait_event_interruptible(*waitq, - atomic_read(credits) > 0 || - t->status != SMB_DIRECT_CS_CONNECTED); + atomic_read(total_credits) >= needed || + t->status != SMB_DIRECT_CS_CONNECTED); if (t->status != SMB_DIRECT_CS_CONNECTED) return -ENOTCONN; @@ -1021,7 +1022,19 @@ static int wait_for_send_credits(struct return ret; } - return wait_for_credits(t, &t->wait_send_credits, &t->send_credits); + return wait_for_credits(t, &t->wait_send_credits, &t->send_credits, 1); +} + +static int wait_for_rw_credits(struct smb_direct_transport *t, int credits) +{ + return wait_for_credits(t, &t->wait_rw_credits, &t->rw_credits, credits); +} + +static int calc_rw_credits(struct smb_direct_transport *t, + char *buf, unsigned int len) +{ + return DIV_ROUND_UP(get_buf_page_count(buf, len), + t->pages_per_rw_credit); } static int smb_direct_create_header(struct smb_direct_transport *t, @@ -1337,8 +1350,8 @@ static void read_write_done(struct ib_cq smb_direct_disconnect_rdma_connection(t); } - if (atomic_inc_return(&t->rw_avail_ops) > 0) - wake_up(&t->wait_rw_avail_ops); + if (atomic_inc_return(&t->rw_credits) > 0) + wake_up(&t->wait_rw_credits); rdma_rw_ctx_destroy(&msg->rw_ctx, t->qp, t->qp->port, msg->sg_list, msg->sgt.nents, dir); @@ -1369,8 +1382,10 @@ static int smb_direct_rdma_xmit(struct s struct ib_send_wr *first_wr = NULL; u32 remote_key = le32_to_cpu(desc[0].token); u64 remote_offset = le64_to_cpu(desc[0].offset); + int credits_needed; - ret = wait_for_credits(t, &t->wait_rw_avail_ops, &t->rw_avail_ops); + credits_needed = calc_rw_credits(t, buf, buf_len); + ret = wait_for_rw_credits(t, credits_needed); if (ret < 0) return ret; @@ -1378,7 +1393,7 @@ static int smb_direct_rdma_xmit(struct s msg = kmalloc(offsetof(struct smb_direct_rdma_rw_msg, sg_list) + sizeof(struct scatterlist) * SG_CHUNK_SIZE, GFP_KERNEL); if (!msg) { - atomic_inc(&t->rw_avail_ops); + atomic_add(credits_needed, &t->rw_credits); return -ENOMEM; } @@ -1387,7 +1402,7 @@ static int smb_direct_rdma_xmit(struct s get_buf_page_count(buf, buf_len), msg->sg_list, SG_CHUNK_SIZE); if (ret) { - atomic_inc(&t->rw_avail_ops); + atomic_add(credits_needed, &t->rw_credits); kfree(msg); return -ENOMEM; } @@ -1423,7 +1438,7 @@ static int smb_direct_rdma_xmit(struct s return 0; err: - atomic_inc(&t->rw_avail_ops); + atomic_add(credits_needed, &t->rw_credits); if (first_wr) rdma_rw_ctx_destroy(&msg->rw_ctx, t->qp, t->qp->port, msg->sg_list, msg->sgt.nents, @@ -1648,11 +1663,19 @@ out_err: return ret; } +static unsigned int smb_direct_get_max_fr_pages(struct smb_direct_transport *t) +{ + return min_t(unsigned int, + t->cm_id->device->attrs.max_fast_reg_page_list_len, + 256); +} + static int smb_direct_init_params(struct smb_direct_transport *t, struct ib_qp_cap *cap) { struct ib_device *device = t->cm_id->device; - int max_send_sges, max_pages, max_rw_wrs, max_send_wrs; + int max_send_sges, max_rw_wrs, max_send_wrs; + unsigned int max_sge_per_wr, wrs_per_credit; /* need 2 more sge. because a SMB_DIRECT header will be mapped, * and maybe a send buffer could be not page aligned. @@ -1664,25 +1687,31 @@ static int smb_direct_init_params(struct return -EINVAL; } - /* - * allow smb_direct_max_outstanding_rw_ops of in-flight RDMA - * read/writes. HCA guarantees at least max_send_sge of sges for - * a RDMA read/write work request, and if memory registration is used, - * we need reg_mr, local_inv wrs for each read/write. + /* Calculate the number of work requests for RDMA R/W. + * The maximum number of pages which can be registered + * with one Memory region can be transferred with one + * R/W credit. And at least 4 work requests for each credit + * are needed for MR registration, RDMA R/W, local & remote + * MR invalidation. */ t->max_rdma_rw_size = smb_direct_max_read_write_size; - max_pages = DIV_ROUND_UP(t->max_rdma_rw_size, PAGE_SIZE) + 1; - max_rw_wrs = DIV_ROUND_UP(max_pages, SMB_DIRECT_MAX_SEND_SGES); - max_rw_wrs += rdma_rw_mr_factor(device, t->cm_id->port_num, - max_pages) * 2; - max_rw_wrs *= smb_direct_max_outstanding_rw_ops; + t->pages_per_rw_credit = smb_direct_get_max_fr_pages(t); + t->max_rw_credits = DIV_ROUND_UP(t->max_rdma_rw_size, + (t->pages_per_rw_credit - 1) * + PAGE_SIZE); + + max_sge_per_wr = min_t(unsigned int, device->attrs.max_send_sge, + device->attrs.max_sge_rd); + wrs_per_credit = max_t(unsigned int, 4, + DIV_ROUND_UP(t->pages_per_rw_credit, + max_sge_per_wr) + 1); + max_rw_wrs = t->max_rw_credits * wrs_per_credit; max_send_wrs = smb_direct_send_credit_target + max_rw_wrs; if (max_send_wrs > device->attrs.max_cqe || max_send_wrs > device->attrs.max_qp_wr) { - pr_err("consider lowering send_credit_target = %d, or max_outstanding_rw_ops = %d\n", - smb_direct_send_credit_target, - smb_direct_max_outstanding_rw_ops); + pr_err("consider lowering send_credit_target = %d\n", + smb_direct_send_credit_target); pr_err("Possible CQE overrun, device reporting max_cqe %d max_qp_wr %d\n", device->attrs.max_cqe, device->attrs.max_qp_wr); return -EINVAL; @@ -1717,7 +1746,7 @@ static int smb_direct_init_params(struct t->send_credit_target = smb_direct_send_credit_target; atomic_set(&t->send_credits, 0); - atomic_set(&t->rw_avail_ops, smb_direct_max_outstanding_rw_ops); + atomic_set(&t->rw_credits, t->max_rw_credits); t->max_send_size = smb_direct_max_send_size; t->max_recv_size = smb_direct_max_receive_size; @@ -1725,12 +1754,10 @@ static int smb_direct_init_params(struct cap->max_send_wr = max_send_wrs; cap->max_recv_wr = t->recv_credit_max; - cap->max_send_sge = SMB_DIRECT_MAX_SEND_SGES; + cap->max_send_sge = max_sge_per_wr; cap->max_recv_sge = SMB_DIRECT_MAX_RECV_SGES; cap->max_inline_data = 0; - cap->max_rdma_ctxs = - rdma_rw_mr_factor(device, t->cm_id->port_num, max_pages) * - smb_direct_max_outstanding_rw_ops; + cap->max_rdma_ctxs = t->max_rw_credits; return 0; } @@ -1823,7 +1850,8 @@ static int smb_direct_create_qpair(struc } t->send_cq = ib_alloc_cq(t->cm_id->device, t, - t->send_credit_target, 0, IB_POLL_WORKQUEUE); + smb_direct_send_credit_target + cap->max_rdma_ctxs, + 0, IB_POLL_WORKQUEUE); if (IS_ERR(t->send_cq)) { pr_err("Can't create RDMA send CQ\n"); ret = PTR_ERR(t->send_cq); @@ -1832,8 +1860,7 @@ static int smb_direct_create_qpair(struc } t->recv_cq = ib_alloc_cq(t->cm_id->device, t, - cap->max_send_wr + cap->max_rdma_ctxs, - 0, IB_POLL_WORKQUEUE); + t->recv_credit_max, 0, IB_POLL_WORKQUEUE); if (IS_ERR(t->recv_cq)) { pr_err("Can't create RDMA recv CQ\n"); ret = PTR_ERR(t->recv_cq); @@ -1862,17 +1889,12 @@ static int smb_direct_create_qpair(struc pages_per_rw = DIV_ROUND_UP(t->max_rdma_rw_size, PAGE_SIZE) + 1; if (pages_per_rw > t->cm_id->device->attrs.max_sgl_rd) { - int pages_per_mr, mr_count; - - pages_per_mr = min_t(int, pages_per_rw, - t->cm_id->device->attrs.max_fast_reg_page_list_len); - mr_count = DIV_ROUND_UP(pages_per_rw, pages_per_mr) * - atomic_read(&t->rw_avail_ops); - ret = ib_mr_pool_init(t->qp, &t->qp->rdma_mrs, mr_count, - IB_MR_TYPE_MEM_REG, pages_per_mr, 0); + ret = ib_mr_pool_init(t->qp, &t->qp->rdma_mrs, + t->max_rw_credits, IB_MR_TYPE_MEM_REG, + t->pages_per_rw_credit, 0); if (ret) { pr_err("failed to init mr pool count %d pages %d\n", - mr_count, pages_per_mr); + t->max_rw_credits, t->pages_per_rw_credit); goto err; } } Patches currently in stable-queue which might be from linkinjeon@xxxxxxxxx are queue-5.15/ksmbd-fix-uaf-issue-from-opinfo-conn.patch queue-5.15/ksmbd-fix-race-condition-from-parallel-smb2-lock-requests.patch queue-5.15/ksmbd-validate-session-id-and-tree-id-in-compound-request.patch queue-5.15/ksmbd-reorganize-ksmbd_iov_pin_rsp.patch queue-5.15/ksmbd-convert-to-use-sysfs_emit-sysfs_emit_at-apis.patch queue-5.15/ksmbd-validate-length-in-smb2_write.patch queue-5.15/ksmbd-add-support-for-key-exchange.patch queue-5.15/ksmbd-request-update-to-stale-share-config.patch queue-5.15/ksmbd-remove-generic_fillattr-use-in-smb2_open.patch queue-5.15/ksmbd-fix-uninitialized-pointer-read-in-smb2_create_link.patch queue-5.15/ksmbd-set-smb2_session_flag_encrypt_data-when-enforcing-data-encryption-for-this-share.patch queue-5.15/ksmbd-constify-struct-path.patch queue-5.15/ksmbd-casefold-utf-8-share-names-and-fix-ascii-lowercase-conversion.patch queue-5.15/ksmbd-validate-smb-request-protocol-id.patch queue-5.15/ksmbd-avoid-out-of-bounds-access-in-decode_preauth_ctxt.patch queue-5.15/ksmbd-release-interim-response-after-sending-status-pending-response.patch queue-5.15/ksmbd-fix-racy-issue-under-cocurrent-smb2-tree-disconnect.patch queue-5.15/ksmbd-fix-out-of-bounds-read-in-smb2_sess_setup.patch queue-5.15/ksmbd-decrease-the-number-of-smb3-smbdirect-server-sges.patch queue-5.15/ksmbd-make-utf-8-file-name-comparison-work-in-__caseless_lookup.patch queue-5.15/ksmbd-use-f_setlk-when-unlocking-a-file.patch queue-5.15/fs-introduce-lock_rename_child-helper.patch queue-5.15/ksmbd-use-kzalloc-instead-of-__gfp_zero.patch queue-5.15/ksmbd-set-ntlmssp_negotiate_seal-flag-to-challenge-blob.patch queue-5.15/ksmbd-call-ib_drain_qp-when-disconnected.patch queue-5.15/ksmbd-fix-posix_acls-and-acls-dereferencing-possible-err_ptr.patch queue-5.15/ksmbd-destroy-expired-sessions.patch queue-5.15/ksmbd-fix-resource-leak-in-smb2_lock.patch queue-5.15/ksmbd-check-iov-vector-index-in-ksmbd_conn_write.patch queue-5.15/ksmbd-hide-socket-error-message-when-ipv6-config-is-disable.patch queue-5.15/ksmbd-use-netif_is_bridge_port.patch queue-5.15/ksmbd-smbd-simplify-tracking-pending-packets.patch queue-5.15/ksmbd-implements-sess-rpc_handle_list-as-xarray.patch queue-5.15/ksmbd-remove-duplicate-flag-set-in-smb2_write.patch queue-5.15/ksmbd-separately-allocate-ci-per-dentry.patch queue-5.15/ksmbd-fix-racy-issue-from-session-setup-and-logoff.patch queue-5.15/ksmbd-fix-race-condition-between-session-lookup-and-expire.patch queue-5.15/ksmbd-fix-wrong-smbd-max-read-write-size-check.patch queue-5.15/ksmbd-replace-usage-of-found-with-dedicated-list-iterator-variable.patch queue-5.15/ksmbd-add-support-for-surrogate-pair-conversion.patch queue-5.15/ksmbd-reduce-server-smbdirect-max-send-receive-segment-sizes.patch queue-5.15/ksmbd-fix-force-create-mode-and-force-directory-mode.patch queue-5.15/ksmbd-remove-unneeded-mark_inode_dirty-in-set_info_sec.patch queue-5.15/ksmbd-fix-potential-double-free-on-smb2_read_pipe-error-path.patch queue-5.15/ksmbd-remove-unused-ksmbd_tree_conn_share-function.patch queue-5.15/ksmbd-block-asynchronous-requests-when-making-a-delay-on-session-setup.patch queue-5.15/ksmbd-call-putname-after-using-the-last-component.patch queue-5.15/ksmbd-don-t-open-code-file_path.patch queue-5.15/ksmbd-fix-passing-freed-memory-aux_payload_buf.patch queue-5.15/ksmbd-fill-sids-in-smb_find_file_posix_info-response.patch queue-5.15/ksmbd-don-t-open-code-pd.patch queue-5.15/ksmbd-shorten-experimental-warning-on-loading-the-module.patch queue-5.15/ksmbd-remove-filename-in-ksmbd_file.patch queue-5.15/ksmbd-move-oplock-handling-after-unlock-parent-dir.patch queue-5.15/ksmbd-fix-race-condition-between-tree-conn-lookup-and-disconnect.patch queue-5.15/ksmbd-smbd-introduce-read-write-credits-for-rdma-read-write.patch queue-5.15/ksmbd-fix-slab-out-of-bounds-in-init_smb2_rsp_hdr.patch queue-5.15/ksmbd-fix-recursive-locking-in-vfs-helpers.patch queue-5.15/ksmbd-fix-some-kernel-doc-comments.patch queue-5.15/ksmbd-use-struct_size-helper-in-ksmbd_negotiate_smb_dialect.patch queue-5.15/ksmbd-smbd-relax-the-count-of-sges-required.patch queue-5.15/ksmbd-fix-wrong-error-response-status-by-using-set_smb2_rsp_status.patch queue-5.15/ksmbd-fix-spelling-mistake-excceed-exceeded.patch queue-5.15/ksmbd-fix-null-pointer-dereferences-in-ksmbd_update_fstate.patch queue-5.15/ksmbd-fix-encryption-failure-issue-for-session-logoff-response.patch queue-5.15/ksmbd-prevent-memory-leak-on-error-return.patch queue-5.15/ksmbd-fix-racy-issue-from-using-d_parent-and-d_name.patch queue-5.15/ksmbd-change-security-id-to-the-one-samba-used-for-posix-extension.patch queue-5.15/ksmbd-handle-malformed-smb1-message.patch queue-5.15/ksmbd-don-t-update-op_state-as-oplock_state_none-on-error.patch queue-5.15/ksmbd-smbd-fix-connection-dropped-issue.patch queue-5.15/ksmbd-fix-racy-issue-from-smb2-close-and-logoff-with-multichannel.patch queue-5.15/ksmbd-change-the-return-value-of-ksmbd_vfs_query_maximal_access-to-void.patch queue-5.15/ksmbd-fix-slub-overflow-in-ksmbd_decode_ntlmssp_auth_blob.patch queue-5.15/ksmbd-replace-one-element-array-with-flexible-array-member.patch queue-5.15/ksmbd-fix-uninitialized-pointer-read-in-ksmbd_vfs_rename.patch queue-5.15/ksmbd-replace-one-element-arrays-with-flexible-array-members.patch queue-5.15/ksmbd-fix-unsigned-expression-compared-with-zero.patch queue-5.15/ksmbd-implements-sess-ksmbd_chann_list-as-xarray.patch queue-5.15/ksmbd-set-file-permission-mode-to-match-samba-server-posix-extension-behavior.patch queue-5.15/ksmbd-fix-wrong-interim-response-on-compound.patch queue-5.15/ksmbd-return-invalid-parameter-error-response-if-smb2-request-is-invalid.patch queue-5.15/ksmbd-smbd-validate-buffer-descriptor-structures.patch queue-5.15/ksmbd-fix-missing-rdma-capable-flag-for-ipoib-device-in-ksmbd_rdma_capable_netdev.patch queue-5.15/ksmbd-send-proper-error-response-in-smb2_tree_connect.patch queue-5.15/ksmbd-set-negotiatecontextcount-once-instead-of-every-inc.patch queue-5.15/ksmbd-fix-typo-syncronous-synchronous.patch queue-5.15/ksmbd-validate-share-name-from-share-config-response.patch queue-5.15/ksmbd-fix-possible-deadlock-in-smb2_open.patch queue-5.15/ksmbd-fix-multiple-out-of-bounds-read-during-context-decoding.patch queue-5.15/ksmbd-add-missing-calling-smb2_set_err_rsp-on-error.patch queue-5.15/ksmbd-remove-unused-ksmbd_share_configs_cleanup-function.patch queue-5.15/ksmbd-fix-out-of-bound-read-in-parse_lease_state.patch queue-5.15/ksmbd-remove-duplicated-codes.patch queue-5.15/ksmbd-remove-a-redundant-zeroing-of-memory.patch queue-5.15/ksmbd-change-leasekey-data-type-to-u8-array.patch queue-5.15/ksmbd-add-support-for-read-compound.patch queue-5.15/ksmbd-fix-kernel-doc-comment-of-ksmbd_vfs_setxattr.patch queue-5.15/ksmbd-remove-unused-compression-negotiate-ctx-packing.patch queue-5.15/ksmbd-switch-to-use-kmemdup_nul-helper.patch queue-5.15/ksmbd-fix-race-condition-from-parallel-smb2-logoff-requests.patch queue-5.15/ksmbd-fix-out-of-bound-read-in-deassemble_neg_contexts.patch queue-5.15/ksmbd-remove-unnecessary-generic_fillattr-in-smb2_open.patch queue-5.15/ksmbd-avoid-duplicate-negotiate-ctx-offset-increments.patch queue-5.15/ksmbd-remove-experimental-warning.patch queue-5.15/ksmbd-return-a-literal-instead-of-err-in-ksmbd_vfs_kern_path_locked.patch queue-5.15/ksmbd-smbd-change-prototypes-of-rdma-read-write-related-functions.patch queue-5.15/ksmbd-fix-out-of-bounds-in-init_smb2_rsp_hdr.patch queue-5.15/ksmbd-fix-possible-memory-leak-in-smb2_lock.patch queue-5.15/ksmbd-remove-unused-field-in-ksmbd_user-struct.patch queue-5.15/ksmbd-fix-one-kernel-doc-comment.patch queue-5.15/ksmbd-no-need-to-wait-for-binded-connection-termination-at-logoff.patch queue-5.15/ksmbd-fix-race-condition-with-fp.patch queue-5.15/ksmbd-fix-wrong-signingkey-creation-when-encryption-is-aes256.patch queue-5.15/ksmbd-update-kconfig-to-note-kerberos-support-and-fix-indentation.patch queue-5.15/ksmbd-move-setting-smb2_flags_async_command-and-asyncid.patch queue-5.15/smb3-fix-ksmbd-bigendian-bug-in-oplock-break-and-move-its-struct-to-smbfs_common.patch queue-5.15/ksmbd-store-fids-as-opaque-u64-integers.patch queue-5.15/ksmbd-delete-asynchronous-work-from-list.patch queue-5.15/ksmbd-use-kvzalloc-instead-of-kvmalloc.patch queue-5.15/ksmbd-smbd-change-the-return-value-of-get_sg_list.patch queue-5.15/ksmbd-add-missing-compound-request-handing-in-some-commands.patch queue-5.15/ksmbd-remove-unused-is_char_allowed-function.patch queue-5.15/ksmbd-use-oid-registry-functions-to-decode-oids.patch queue-5.15/ksmbd-fix-kernel-doc-comment-of-ksmbd_vfs_kern_path_locked.patch queue-5.15/ksmbd-use-wait_event-instead-of-schedule_timeout.patch queue-5.15/ksmbd-check-if-a-mount-point-is-crossed-during-path-lookup.patch queue-5.15/ksmbd-replace-the-ternary-conditional-operator-with-min.patch