linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: cleanup submit_one_bio
@ 2017-04-03 20:45 Liu Bo
  2017-04-04 12:27 ` kbuild test robot
  2017-04-04 17:43 ` Liu Bo
  0 siblings, 2 replies; 3+ messages in thread
From: Liu Bo @ 2017-04-03 20:45 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

@bio_offset is passed into submit_bio_hook and is used at
btrfs_wq_submit_bio(), but only dio code makes use of @bio_offset, so
remove other dead code.

Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/extent_io.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7b5139d..79f38e6a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2746,19 +2746,14 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
 				       unsigned long bio_flags)
 {
 	int ret = 0;
-	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
-	struct page *page = bvec->bv_page;
 	struct extent_io_tree *tree = bio->bi_private;
-	u64 start;
-
-	start = page_offset(page) + bvec->bv_offset;
 
 	bio->bi_private = NULL;
 	bio_get(bio);
 
 	if (tree->ops)
 		ret = tree->ops->submit_bio_hook(page->mapping->host, bio,
-					   mirror_num, bio_flags, start);
+					   mirror_num, bio_flags, 0);
 	else
 		btrfsic_submit_bio(bio);
 
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-04 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-03 20:45 [PATCH] Btrfs: cleanup submit_one_bio Liu Bo
2017-04-04 12:27 ` kbuild test robot
2017-04-04 17:43 ` Liu Bo

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).