btrfs: scrub: fix target device intialization while setting up scrub context
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Jun 2017 13:19:00 +0000 (15:19 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Jun 2017 18:17:02 +0000 (20:17 +0200)
commitded56184a562b925a588b6e78688e2e60757b425
treeba83cb171ab7f1ff717f292115b688a1446199a5
parentbc42bda22345efdb5d8b578d1b4df2c6eaa85c58
btrfs: scrub: fix target device intialization while setting up scrub context

The commit "btrfs: scrub: inline helper scrub_setup_wr_ctx" inlined a
helper but wrongly sets up the target device. Incidentally there's a
local variable with the same name as a parameter in the previous
function, so this got caught during runtime as crash in test btrfs/027.

Reported-by: Chris Mason <clm@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c