aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2012-09-04 18:23:14 -0400
committerKent Overstreet <koverstreet@google.com>2013-03-23 17:15:31 -0400
commit4f2ac93c175c4922bdddbfec6cad94b32cea0070 (patch)
treece9df811f8a59c3af8486ee20fdc9d36fe5bfd25 /fs/logfs
parent5b83636ae3c3b4f87d02a5929ad4dee831534db0 (diff)
block: Remove bi_idx references
For immutable bvecs, all bi_idx usage needs to be audited - so here we're removing all the unnecessary uses. Most of these are places where it was being initialized on a bio that was just allocated, a few others are conversions to standard macros. Signed-off-by: Kent Overstreet <koverstreet@google.com> CC: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/logfs')
-rw-r--r--fs/logfs/dev_bdev.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index e784a217b500..550475ca6a0e 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -32,7 +32,6 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw)
32 bio_vec.bv_len = PAGE_SIZE; 32 bio_vec.bv_len = PAGE_SIZE;
33 bio_vec.bv_offset = 0; 33 bio_vec.bv_offset = 0;
34 bio.bi_vcnt = 1; 34 bio.bi_vcnt = 1;
35 bio.bi_idx = 0;
36 bio.bi_size = PAGE_SIZE; 35 bio.bi_size = PAGE_SIZE;
37 bio.bi_bdev = bdev; 36 bio.bi_bdev = bdev;
38 bio.bi_sector = page->index * (PAGE_SIZE >> 9); 37 bio.bi_sector = page->index * (PAGE_SIZE >> 9);
@@ -108,7 +107,6 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
108 if (i >= max_pages) { 107 if (i >= max_pages) {
109 /* Block layer cannot split bios :( */ 108 /* Block layer cannot split bios :( */
110 bio->bi_vcnt = i; 109 bio->bi_vcnt = i;
111 bio->bi_idx = 0;
112 bio->bi_size = i * PAGE_SIZE; 110 bio->bi_size = i * PAGE_SIZE;
113 bio->bi_bdev = super->s_bdev; 111 bio->bi_bdev = super->s_bdev;
114 bio->bi_sector = ofs >> 9; 112 bio->bi_sector = ofs >> 9;
@@ -136,7 +134,6 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
136 unlock_page(page); 134 unlock_page(page);
137 } 135 }
138 bio->bi_vcnt = nr_pages; 136 bio->bi_vcnt = nr_pages;
139 bio->bi_idx = 0;
140 bio->bi_size = nr_pages * PAGE_SIZE; 137 bio->bi_size = nr_pages * PAGE_SIZE;
141 bio->bi_bdev = super->s_bdev; 138 bio->bi_bdev = super->s_bdev;
142 bio->bi_sector = ofs >> 9; 139 bio->bi_sector = ofs >> 9;
@@ -202,7 +199,6 @@ static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index,
202 if (i >= max_pages) { 199 if (i >= max_pages) {
203 /* Block layer cannot split bios :( */ 200 /* Block layer cannot split bios :( */
204 bio->bi_vcnt = i; 201 bio->bi_vcnt = i;
205 bio->bi_idx = 0;
206 bio->bi_size = i * PAGE_SIZE; 202 bio->bi_size = i * PAGE_SIZE;
207 bio->bi_bdev = super->s_bdev; 203 bio->bi_bdev = super->s_bdev;
208 bio->bi_sector = ofs >> 9; 204 bio->bi_sector = ofs >> 9;
@@ -224,7 +220,6 @@ static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index,
224 bio->bi_io_vec[i].bv_offset = 0; 220 bio->bi_io_vec[i].bv_offset = 0;
225 } 221 }
226 bio->bi_vcnt = nr_pages; 222 bio->bi_vcnt = nr_pages;
227 bio->bi_idx = 0;
228 bio->bi_size = nr_pages * PAGE_SIZE; 223 bio->bi_size = nr_pages * PAGE_SIZE;
229 bio->bi_bdev = super->s_bdev; 224 bio->bi_bdev = super->s_bdev;
230 bio->bi_sector = ofs >> 9; 225 bio->bi_sector = ofs >> 9;