From nobody Sat Feb 7 17:09:25 2026 Received: from mail-pj1-f97.google.com (mail-pj1-f97.google.com [209.85.216.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7235C329378 for ; Fri, 30 Jan 2026 15:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.97 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769786742; cv=none; b=DlhW7jIM8EmkEkOPtY9cqBCtuaIEadqWo67mTAh/PGZSH7DL9dbukT8HbXwTX30no4/KcC8JTe/0MqIfrdqHXiSFj3fxoZQrnO44uMtufner83Y9wyFhUVM8JUGaKTtcH5X+/4xLOLQzX6E8r7vju6K1TdJhnTJxG4X7NIRDDUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769786742; c=relaxed/simple; bh=wKqc5wL6bmJmWU1bp7rBaZXhIYlpKw54rXza8d084hA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KkKmOpyCDQNWZFNXnK6LRSUoRM+oCWh/0pm41PQUL+CBZ2N4eNxkKE0FtU8E/LOg3o8jGjZdfJjVrGuYH68dlJncqVLFAS5AO8Qyyoy5mEgsOFKzSlXZle90/eOYT0XvhLR/oeWITHS9ntVGGNBSxFzvMD199CPeCZC+W9WH5wM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=TQfg0XC/; arc=none smtp.client-ip=209.85.216.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="TQfg0XC/" Received: by mail-pj1-f97.google.com with SMTP id 98e67ed59e1d1-34ab4ac99ebso225534a91.2 for ; Fri, 30 Jan 2026 07:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1769786741; x=1770391541; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=22ajtlAGYSup+nUm/O6p4DsQdEeWGvJ4Xo9qaGa5Z+U=; b=TQfg0XC/Vwwm1/MyMQXRDfNmUznAlCbYpTJ8PonfsHn3I9omqNHnSVGSVFN8L/VwFK J/FgZWk/tbxjAyYvK4GktNEhFvzoO+NkM+ify5d40rQCjUxc6SwLDft2aojoAVu8MxxT bX8DIM3GOSe6k31igeL5Zi+mU1VYAiKDuj4Opw1ft+6Q7b695j3eQHsMj2f1iXayjTy6 38daDy6VeotU1bebvFE9HrqCrd5qkKKhT6JkWywA8YjW19GRcN1bQwW4WbSE3r6qsUlT 3P2U8uVAwwzL+KsJtaSIu0A/tJZOFi+R3XyfhUUE/qQds5E6/BJXIBeSq+VjDBsDNhtd g4EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769786741; x=1770391541; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=22ajtlAGYSup+nUm/O6p4DsQdEeWGvJ4Xo9qaGa5Z+U=; b=fE5FScfM9eXVRl4E05FmK4k8OKp9xKaOpKnaF5ST6x9oyaaLb18sBsMV4hZxNwofT8 5aOwwBUIfNKDHYk/a8ZQWs1vGIieRRvnmB6R4oOy4/sPH4O3Af4Z3NUOEmXb6fMBOn/G J1uHDa7OKOAs4lySBqieh0z9AIQDWkkg7ZMgbLqtlC+fEfjlUFSDphisF3b7qByYKJcm NcSPomPtSXi5dTbZkCWlenN8moooUxSLaUPu3lQ8d05rbaxZZmfObBk15CW/1AOyqma6 afLDXtsyEZjh4PhqIgd0Q0MGPg9nW67C30oRfmwEcx5ZHuV0yah/vs9bYgjBy8Am3lab rPAg== X-Forwarded-Encrypted: i=1; AJvYcCWivUkwYDVrkhlfznLMfEP+FGdRwNrFQrxVqIgU4chYJLtQHPjli5gTY7Ufv8zaNZKjH4zyAiIxU2MAOXg=@vger.kernel.org X-Gm-Message-State: AOJu0YylwAsnE/40OohApmoSS0ze6YRhXi60nyP/ZqCrXrdvA1nJOTfN gDm1D7gjxOpU5IoVmSsZbOSDsrH6Mc/CrAggDLobBSXXRX6JyTp1GlWO7olElF3F9CmSCN+98fL /l1Ex6ocozDZWMU/f45wtbDDoP+d7V0c1PKE8Vcj+O4XW5PrF9ZcX X-Gm-Gg: AZuq6aLJCZnzmmqO/vtZY+dCfLPkOP0AXJiJQFnipk+eopbk9AkzBxpPoPXVk2Ht57k htgRMGW9SpzJnhRpj6tsP5akjk5wYN/SySqjjKWsLoCQf9Hf8q6lZwV3OXgyYTGiG7J4iCM+1ih HVim3c2/lD02k4I6tSX++18dvd71H4B+VEd2XvQAPH20Qxr9RxBIhBwdvyaJjEYESQ6abqmHpas Sri/KJEmwaxX5Who+pRH5rh+G3bYE4Q7w8ZtvjO1s7kMJrcReYbN2DG2qHtSXMV73nDYkNpG0yF +pDXTNhjHL1f4WvSVdrWEHtChikQLcwvNRoemY1IOmvoXc1oCvz7ABd75DghRRneRdIcgTzq7AT bUzhLAkVDou4c7n+Ld/xBerp23L4= X-Received: by 2002:a17:90b:3ccc:b0:34c:2db6:57e8 with SMTP id 98e67ed59e1d1-3543b2efe3amr2777148a91.1.1769786740685; Fri, 30 Jan 2026 07:25:40 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([2620:125:9017:12:36:3:5:0]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3540f3b5f8fsm1166983a91.7.2026.01.30.07.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 07:25:40 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.29.101]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id E3765340603; Fri, 30 Jan 2026 08:25:39 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id D42EEE40A28; Fri, 30 Jan 2026 08:25:39 -0700 (MST) From: Caleb Sander Mateos To: Ming Lei , Jens Axboe Cc: Caleb Sander Mateos , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ublk: remove "can't touch 'ublk_io' any more" comments Date: Fri, 30 Jan 2026 08:25:30 -0700 Message-ID: <20260130152531.1274646-1-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The struct ublk_io is in fact accessed in __ublk_complete_rq() after the comment. But it's not racy to access the ublk_io between clearing its UBLK_IO_FLAG_OWNED_BY_SRV flag and completing the request, as no other thread can use the ublk_io in the meantime. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei --- drivers/block/ublk_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 5efaf53261ce..1c8699ea7abd 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -3336,11 +3336,10 @@ static int ublk_ch_uring_cmd_local(struct io_uring_= cmd *cmd, ret =3D ublk_config_io_buf(ub, io, cmd, addr, &buf_idx); if (buf_idx !=3D UBLK_INVALID_BUF_IDX) io_buffer_unregister_bvec(cmd, buf_idx, issue_flags); compl =3D ublk_need_complete_req(ub, io); =20 - /* can't touch 'ublk_io' any more */ if (req_op(req) =3D=3D REQ_OP_ZONE_APPEND) req->__sector =3D addr; if (compl) __ublk_complete_rq(req, io, ublk_dev_need_map_io(ub), NULL); =20 @@ -3668,11 +3667,10 @@ static int ublk_batch_commit_io(struct ublk_queue *= ubq, __func__, data->ub->dev_info.dev_id, ubq->q_id, elem->tag, ret); return ret; } =20 - /* can't touch 'ublk_io' any more */ if (buf_idx !=3D UBLK_INVALID_BUF_IDX) io_buffer_unregister_bvec(data->cmd, buf_idx, data->issue_flags); if (req_op(req) =3D=3D REQ_OP_ZONE_APPEND) req->__sector =3D ublk_batch_zone_lba(uc, elem); if (compl) --=20 2.45.2