From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
linux-xfs@vger.kernel.org
Subject: [PATCH 15/13] iomap: Inline iomap_read_finish into its one caller
Date: Thu, 17 Sep 2020 23:56:46 +0100 [thread overview]
Message-ID: <20200917225647.26481-2-willy@infradead.org> (raw)
In-Reply-To: <20200917225647.26481-1-willy@infradead.org>
iomap_read_page_end_io() is the only caller of iomap_read_finish()
and it makes future patches easier to have it inline.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/iomap/buffered-io.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 2a6492b3c4db..13b56d656337 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -167,13 +167,6 @@ void iomap_set_range_uptodate(struct page *page, unsigned off, unsigned len)
spin_unlock_irqrestore(&iop->uptodate_lock, flags);
}
-static void
-iomap_read_finish(struct iomap_page *iop, struct page *page)
-{
- if (!iop || atomic_dec_and_test(&iop->read_count))
- unlock_page(page);
-}
-
static void
iomap_read_page_end_io(struct bio_vec *bvec, int error)
{
@@ -187,7 +180,8 @@ iomap_read_page_end_io(struct bio_vec *bvec, int error)
iomap_set_range_uptodate(page, bvec->bv_offset, bvec->bv_len);
}
- iomap_read_finish(iop, page);
+ if (!iop || atomic_dec_and_test(&iop->read_count))
+ unlock_page(page);
}
static void
--
2.28.0
next prev parent reply other threads:[~2020-09-17 22:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200917151050.5363-1-willy@infradead.org>
2020-09-17 22:56 ` [PATCH 14/13] iomap: Inline iomap_iop_set_range_uptodate into its one caller Matthew Wilcox (Oracle)
2020-09-17 22:56 ` Matthew Wilcox (Oracle) [this message]
2020-09-19 6:31 ` [PATCH 15/13] iomap: Inline iomap_read_finish " Christoph Hellwig
2020-09-17 22:56 ` [PATCH 16/13] iomap: Make readpage synchronous Matthew Wilcox (Oracle)
2020-09-19 6:39 ` Christoph Hellwig
2020-09-19 6:43 ` Christoph Hellwig
2020-09-19 17:03 ` Matthew Wilcox
2020-09-19 17:10 ` Matthew Wilcox
2020-09-19 6:31 ` [PATCH 14/13] iomap: Inline iomap_iop_set_range_uptodate into its one caller Christoph Hellwig
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=20200917225647.26481-2-willy@infradead.org \
--to=willy@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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