diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-07-14 11:14:42 +0300 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-07-21 22:47:20 +0300 |
commit | 022e510fcbda79183fd2cdc01abb01b4be80d03f (patch) | |
tree | c1ce4e89348f207fb4e1c572bad3bfd2db4c28b6 /drivers/md/md.h | |
parent | 4ec9f7a18b9fcef6e8f7c13279b48e3bb5d4d704 (diff) | |
download | linux-022e510fcbda79183fd2cdc01abb01b4be80d03f.tar.xz |
md: remove 'idx' from 'struct resync_pages'
bio_add_page() won't fail for resync bio, and the page index for each
bio is same, so remove it.
More importantly the 'idx' of 'struct resync_pages' is initialized in
mempool allocator function, the current way is wrong since mempool is
only responsible for allocation, we can't use that for initialization.
Suggested-by: NeilBrown <neilb@suse.com>
Reported-by: NeilBrown <neilb@suse.com>
Reported-and-tested-by: Patrick <dto@gmx.net>
Fixes: f0250618361d(md: raid10: don't use bio's vec table to manage resync pages)
Fixes: 98d30c5812c3(md: raid1: don't use bio's vec table to manage resync pages)
Cc: stable@vger.kernel.org (4.12+)
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index b50eb4ac1b82..991769cc3615 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -738,7 +738,6 @@ static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio /* for managing resync I/O pages */ struct resync_pages { - unsigned idx; /* for get/put page from the pool */ void *raid_bio; struct page *pages[RESYNC_PAGES]; }; |