From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384244; b=Qc/c2LCKiBuQlbDNxv4YQ7bw5pQktcjlTtGUzQ4zAr9/OmWgjEpaYRGricJ5Yxo331mt RbaSWFiiasWLvNLcU80I1ZeQemfRfFi99UWL2StnFjGVPl8LmlTb9WQt0YG70iZFTHp6I IObyRsqiM5zldLDuAVPhyR4PaErgw4iBABj+V+X+uzzNyZifjNAnkTtvyv18Z2efXnDRb PsgbhBD098Qx3g7698awRfiVL1vS/Fhju4H5id6WOQZbQdBe8f+jyf/5Vrkz/BNWyEM3M QKMXslhMjMMffti9eSlX3Wf4Tz+pURI1r8WeFyC4/DIc6ElWhYR2E/WHLMzf3CCqFxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384244; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=cR3pmKPIewmZXusjojgikwyopyCFvXvWjcj3zFwI5M8=; b=eP6P7W56pooVo/i3PRobdPe0B5CycVF5hrN7yE7T2sTvq8Sz7a3e8k/JP22p3XAu89up /kPB4AsfShOh0iNP+MCYmVZ8iMGOdOS97dwmlvdBBvcVKL1encOKxHO4gICluPOjY8JXn lP9C/cLdftZwbC0gIQGAUUy8fa/TKdXaZjRvU+FeKA0gSmn2wOVnL5cEkPMBkiWYm2O0w eAyxE9nTX9ldAryXHqZG5BYKy/HBLu+qZSEVweoqZjHMdkQSiKBZm9W4u+EmsT6WpEysx K3ARN/KKpMVOPxm19MBs750425LCs8nhBR9h7wfl5paL6VyXI7dd4bRwIAnOmNoB2wA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=U3cUOUlQ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDADE606A322; Fri, 4 Dec 2026 11:37:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=U3cUOUlQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BB4B1F000CE; Fri, 4 Dec 2026 11:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384244; bh=cR3pmKPIewmZXusjojgikwyopyCFvXvWjcj3zFwI5M8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=U3cUOUlQTwcJGyCmIIamgmC+dDvhoO9c4sOi9UnWftX3S6Y+/VMtwKtwB/QQKXIow /bcHLbPuXoG3no64FJjKj3YgSNFisKHiuhAYU6ReWEAOkvh8XrvH7pqv/VUXkmrfZ+ 896WZ+pQJFzysDobd7eVLgBxLVe1d6cRlAwSPEzc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , Christian Brauner , Jan Kara , Damien Le Moal , Jens Axboe , Sasha Levin Subject: [PATCH 6.12 549/555] direct-io: remove IOCB_NOWAIT support Date: Fri, 4 Dec 2026 19:09:52 +0900 Message-ID: <20261204100629.468752299@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig [ Upstream commit 38273e7b153d88562bddba9a24dafa733da4fd22 ] None of the file systems using the legacy direct I/O code actually sets FMODE_NOWAIT, and if they did this would not work, as the write locking could not handle the retry. Remove this dead code. Signed-off-by: Christoph Hellwig Reviewed-by: Christian Brauner Reviewed-by: Jan Kara Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20260518063336.507369-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/direct-io.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index bbd05f1a21453..102df712aa523 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -502,12 +502,8 @@ static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio) const enum req_op dio_op = dio->opf & REQ_OP_MASK; bool should_dirty = dio_op == REQ_OP_READ && dio->should_dirty; - if (err) { - if (err == BLK_STS_AGAIN && (bio->bi_opf & REQ_NOWAIT)) - dio->io_error = -EAGAIN; - else - dio->io_error = -EIO; - } + if (err) + dio->io_error = -EIO; if (dio->is_async && should_dirty) { bio_check_pages_dirty(bio); /* transfers ownership */ @@ -1178,13 +1174,10 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, dio->is_async = true; dio->inode = inode; - if (iov_iter_rw(iter) == WRITE) { + if (iov_iter_rw(iter) == WRITE) dio->opf = REQ_OP_WRITE | REQ_SYNC | REQ_IDLE; - if (iocb->ki_flags & IOCB_NOWAIT) - dio->opf |= REQ_NOWAIT; - } else { + else dio->opf = REQ_OP_READ; - } /* * For AIO O_(D)SYNC writes we need to defer completions to a workqueue -- 2.53.0