linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 3/4] block: remove BIO_PAGE_REFFED
Date: Wed, 14 Jun 2023 16:03:40 +0200	[thread overview]
Message-ID: <20230614140341.521331-4-hch@lst.de> (raw)
In-Reply-To: <20230614140341.521331-1-hch@lst.de>

Now that all block direct I/O helpers use page pinning, this flag is
unused.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk.h               | 2 --
 include/linux/bio.h       | 3 +--
 include/linux/blk_types.h | 1 -
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/block/blk.h b/block/blk.h
index 768852a84fefb3..608c5dcc516b55 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -445,8 +445,6 @@ static inline void bio_release_page(struct bio *bio, struct page *page)
 {
 	if (bio_flagged(bio, BIO_PAGE_PINNED))
 		unpin_user_page(page);
-	else if (bio_flagged(bio, BIO_PAGE_REFFED))
-		put_page(page);
 }
 
 struct request_queue *blk_alloc_queue(int node_id);
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 61752292896494..c4f5b5228105fe 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -492,8 +492,7 @@ void zero_fill_bio(struct bio *bio);
 
 static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
 {
-	if (bio_flagged(bio, BIO_PAGE_REFFED) ||
-	    bio_flagged(bio, BIO_PAGE_PINNED))
+	if (bio_flagged(bio, BIO_PAGE_PINNED))
 		__bio_release_pages(bio, mark_dirty);
 }
 
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index deb69eeab6bd7b..752a54e3284b27 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -326,7 +326,6 @@ struct bio {
  */
 enum {
 	BIO_PAGE_PINNED,	/* Unpin pages in bio_release_pages() */
-	BIO_PAGE_REFFED,	/* put pages in bio_release_pages() */
 	BIO_CLONED,		/* doesn't own data */
 	BIO_BOUNCED,		/* bio is a bounce bio */
 	BIO_QUIET,		/* Make BIO Quiet */
-- 
2.39.2


  parent reply	other threads:[~2023-06-14 14:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 14:03 dio / splice fixups Christoph Hellwig
2023-06-14 14:03 ` [PATCH 1/4] splice: don't call file_accessed in copy_splice_read Christoph Hellwig
2023-06-14 18:03   ` Johannes Thumshirn
2023-06-16 10:45   ` Christian Brauner
2023-06-14 14:03 ` [PATCH 2/4] splice: simplify a conditional " Christoph Hellwig
2023-06-14 18:01   ` Johannes Thumshirn
2023-06-16 10:46   ` Christian Brauner
2023-06-14 14:03 ` Christoph Hellwig [this message]
2023-06-14 18:03   ` [PATCH 3/4] block: remove BIO_PAGE_REFFED Johannes Thumshirn
2023-06-16 10:47   ` Christian Brauner
2023-06-14 14:03 ` [PATCH 4/4] iov_iter: remove iov_iter_get_pages and iov_iter_get_pages_alloc Christoph Hellwig
2023-06-16 10:48   ` Christian Brauner
2023-06-16  9:44 ` [PATCH 2/4] splice: simplify a conditional in copy_splice_read David Howells
2023-06-16  9:46 ` dio / splice fixups David Howells
2023-06-16 16:08 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230614140341.521331-4-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).