Merge tag 'vfs-6.7.misc' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
[linux-block.git] / fs / smb / server / server.c
index 801cd0929209c6817ddc0282e2576a14282161a0..3079e607c5fe6db71e3cc70a76bcb26d90f813c3 100644 (file)
@@ -115,8 +115,10 @@ static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn,
        if (check_conn_state(work))
                return SERVER_HANDLER_CONTINUE;
 
-       if (ksmbd_verify_smb_message(work))
+       if (ksmbd_verify_smb_message(work)) {
+               conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER);
                return SERVER_HANDLER_ABORT;
+       }
 
        command = conn->ops->get_cmd_val(work);
        *cmd = command;
@@ -239,6 +241,8 @@ static void __handle_ksmbd_work(struct ksmbd_work *work,
        } while (is_chained == true);
 
 send:
+       if (work->tcon)
+               ksmbd_tree_connect_put(work->tcon);
        smb3_preauth_hash_rsp(work);
        if (work->sess && work->sess->enc && work->encrypted &&
            conn->ops->encrypt_resp) {
@@ -590,8 +594,6 @@ static int __init ksmbd_server_init(void)
        if (ret)
                goto err_crypto_destroy;
 
-       pr_warn_once("The ksmbd server is experimental\n");
-
        return 0;
 
 err_crypto_destroy: