From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C865242AF80; Thu, 23 Jul 2026 14:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784818215; cv=none; b=t20tOnVcctHY/W1uOAtpqJd+0TrcqV2s9ZkpjtNYVzykoLOTcFm1cN4HGS4cKUNE68Cb7WsVxprNkNBBmKmfHN8V/eKquoqGif6aIFCoP5dXlp5DAudC9D0j8r5cPHEhzovP04HUmfT1GWHx2NIyqxwAwJEKMpfx18A77aZqfc4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784818215; c=relaxed/simple; bh=qeZM1qjRFnadQ0+2xHfJiTpn5zZsfw3zZU9M+IBoW9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IDihbhb5nh+pjhOWuj/QRU+Ae8ffa0ZpKfemWtjWQK/N0o8U0NfclWr+o8j1UtoS5k6wHibTy/uZxTsB4LiqqBdzDElcbb8MeTyQpM3xx79bZgD+SrfcV88jNHCOMjc6nqXuX5UNCiYRvgJQFWX86TQPWzNDinNda8Sfq68yiLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=kkQuwaBR; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kkQuwaBR" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=BmSdDCU376JH5jZcyBs3YCGK7N267sqFMLaAyvAbnZU=; b=kkQuwaBRsoy9mr65kvJ733uPoJ dxcu5oATN21CyBUmZzMynNmoQpOM4aiTEcGkQAw3VZVcIq2OWvmKs/ntmI0vHHNAMABUHBftyzEQP aCzLMm9pIPJZrQa1pJR2ebvqJxGJwO3YSV2pdnbgQPmEX1vIk81yfqzTNiNx1UNyEKy0XTghhlz72 TTSh67doVnkn2NGcuaAk8vdHB8NFiqfEUSKy8/a06tHjRkP5lksmrfs2WeS+kWIB3EdyYGO7DcmTk ihP9uZ423S8GU4ON+H+sX0ZlcYg3ax35tRZpHT1ooY4kyp49YnN9Y36ZnoNyTRbgZhnQ8hK0O1LCm cpPVoeYQ==; Received: from [2001:4bb8:2e9:b20c:3d3c:bb0:5e13:19af] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wmukW-0000000EXGy-2QF4; Thu, 23 Jul 2026 14:50:12 +0000 From: Christoph Hellwig To: Jens Axboe , Christian Brauner , "Darrick J. Wong" , Carlos Maiolino Cc: Tal Zussman , Anuj Gupta , linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 02/22] block: remove bip_should_check Date: Thu, 23 Jul 2026 16:49:27 +0200 Message-ID: <20260723145000.116419-3-hch@lst.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260723145000.116419-1-hch@lst.de> References: <20260723145000.116419-1-hch@lst.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html There is no benefit in using this helper over the simple flags check. Signed-off-by: Christoph Hellwig Reviewed-by: Anuj Gupta --- block/bio-integrity-auto.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c index b1c733ecfd2e..43ac9f338183 100644 --- a/block/bio-integrity-auto.c +++ b/block/bio-integrity-auto.c @@ -45,10 +45,6 @@ static void bio_integrity_verify_fn(struct work_struct *work) } #define BIP_CHECK_FLAGS (BIP_CHECK_GUARD | BIP_CHECK_REFTAG | BIP_CHECK_APPTAG) -static bool bip_should_check(struct bio_integrity_payload *bip) -{ - return bip->bip_flags & BIP_CHECK_FLAGS; -} /** * __bio_integrity_endio - Integrity I/O completion function @@ -66,7 +62,7 @@ bool __bio_integrity_endio(struct bio *bio) container_of(bip, struct bio_integrity_data, bip); if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && - bip_should_check(bip)) { + (bip->bip_flags & BIP_CHECK_FLAGS)) { INIT_WORK(&bid->work, bio_integrity_verify_fn); queue_work(kintegrityd_wq, &bid->work); return false; @@ -99,7 +95,7 @@ void bio_integrity_prep(struct bio *bio, unsigned int action) bio_integrity_setup_default(bio); /* Auto-generate integrity metadata if this is a write */ - if (bio_data_dir(bio) == WRITE && bip_should_check(&bid->bip)) + if (bio_data_dir(bio) == WRITE && (bid->bip.bip_flags & BIP_CHECK_FLAGS)) bio_integrity_generate(bio); else bid->saved_bio_iter = bio->bi_iter; -- 2.53.0