]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nilfs2: Convert nilfs_gccache_submit_read_data to bh_submit()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 28 May 2026 17:31:41 +0000 (18:31 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 4 Jun 2026 08:28:10 +0000 (10:28 +0200)
Avoid an extra indirect function call and changing the buffer refcount
by using bh_submit() instead of submit_bh().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20260528173150.1093780-29-willy@infradead.org
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: linux-nilfs@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/nilfs2/gcinode.c

index 62d4c1b787e95c961a360a4214d621d564ad8b4c..85379ac23ae2f234f9392d081fc26b917eed7b5a 100644 (file)
@@ -83,9 +83,7 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,
        if (!buffer_mapped(bh))
                set_buffer_mapped(bh);
        bh->b_blocknr = pbn;
-       bh->b_end_io = end_buffer_read_sync;
-       get_bh(bh);
-       submit_bh(REQ_OP_READ, bh);
+       bh_submit(bh, REQ_OP_READ, bh_end_read);
        if (vbn)
                bh->b_blocknr = vbn;
  out: