diff options
author | David Sterba <dsterba@suse.cz> | 2014-07-29 19:25:30 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-02 11:30:30 -0400 |
commit | 8b9456da037ab53428d6347fa2fa088933da1424 (patch) | |
tree | 6e0482184a4081cce439353dd167eb37062245b3 /fs | |
parent | 97eb6b69d1e856cb5e1cf2c3d94afab643e93128 (diff) |
btrfs: remove unused members from struct scrub_warning
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/scrub.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b9c37ac9ed1b..efa083113827 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -177,17 +177,12 @@ struct scrub_copy_nocow_ctx { | |||
177 | struct scrub_warning { | 177 | struct scrub_warning { |
178 | struct btrfs_path *path; | 178 | struct btrfs_path *path; |
179 | u64 extent_item_size; | 179 | u64 extent_item_size; |
180 | char *scratch_buf; | ||
181 | char *msg_buf; | ||
182 | const char *errstr; | 180 | const char *errstr; |
183 | sector_t sector; | 181 | sector_t sector; |
184 | u64 logical; | 182 | u64 logical; |
185 | struct btrfs_device *dev; | 183 | struct btrfs_device *dev; |
186 | int msg_bufsize; | ||
187 | int scratch_bufsize; | ||
188 | }; | 184 | }; |
189 | 185 | ||
190 | |||
191 | static void scrub_pending_bio_inc(struct scrub_ctx *sctx); | 186 | static void scrub_pending_bio_inc(struct scrub_ctx *sctx); |
192 | static void scrub_pending_bio_dec(struct scrub_ctx *sctx); | 187 | static void scrub_pending_bio_dec(struct scrub_ctx *sctx); |
193 | static void scrub_pending_trans_workers_inc(struct scrub_ctx *sctx); | 188 | static void scrub_pending_trans_workers_inc(struct scrub_ctx *sctx); |
@@ -551,7 +546,6 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock) | |||
551 | u64 ref_root; | 546 | u64 ref_root; |
552 | u32 item_size; | 547 | u32 item_size; |
553 | u8 ref_level; | 548 | u8 ref_level; |
554 | const int bufsize = 4096; | ||
555 | int ret; | 549 | int ret; |
556 | 550 | ||
557 | WARN_ON(sblock->page_count < 1); | 551 | WARN_ON(sblock->page_count < 1); |
@@ -559,18 +553,13 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock) | |||
559 | fs_info = sblock->sctx->dev_root->fs_info; | 553 | fs_info = sblock->sctx->dev_root->fs_info; |
560 | 554 | ||
561 | path = btrfs_alloc_path(); | 555 | path = btrfs_alloc_path(); |
556 | if (!path) | ||
557 | return; | ||
562 | 558 | ||
563 | swarn.scratch_buf = kmalloc(bufsize, GFP_NOFS); | ||
564 | swarn.msg_buf = kmalloc(bufsize, GFP_NOFS); | ||
565 | swarn.sector = (sblock->pagev[0]->physical) >> 9; | 559 | swarn.sector = (sblock->pagev[0]->physical) >> 9; |
566 | swarn.logical = sblock->pagev[0]->logical; | 560 | swarn.logical = sblock->pagev[0]->logical; |
567 | swarn.errstr = errstr; | 561 | swarn.errstr = errstr; |
568 | swarn.dev = NULL; | 562 | swarn.dev = NULL; |
569 | swarn.msg_bufsize = bufsize; | ||
570 | swarn.scratch_bufsize = bufsize; | ||
571 | |||
572 | if (!path || !swarn.scratch_buf || !swarn.msg_buf) | ||
573 | goto out; | ||
574 | 563 | ||
575 | ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, | 564 | ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, |
576 | &flags); | 565 | &flags); |
@@ -611,8 +600,6 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock) | |||
611 | 600 | ||
612 | out: | 601 | out: |
613 | btrfs_free_path(path); | 602 | btrfs_free_path(path); |
614 | kfree(swarn.scratch_buf); | ||
615 | kfree(swarn.msg_buf); | ||
616 | } | 603 | } |
617 | 604 | ||
618 | static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx) | 605 | static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx) |