bdi: remove bdi->wb_lock locking around bdi->dev clearing in bdi_unregister()
authorTejun Heo <tj@kernel.org>
Sun, 7 Sep 2014 23:03:58 +0000 (08:03 +0900)
committerJens Axboe <axboe@fb.com>
Mon, 8 Sep 2014 16:00:38 +0000 (10:00 -0600)
commitb68757341d8015d28e261990deea58dd836e04da
tree0ebc92ce23fe41cebe2a81733e609a9b303522a6
parente36f1dfce0b45d347927568efe1088821758cc3c
bdi: remove bdi->wb_lock locking around bdi->dev clearing in bdi_unregister()

The only places where NULL test on bdi->dev is used are
bdi_[un]register().  The functions can't be called in parallel anyway
and there's no point in protecting bdi->dev clearing with a lock.
Remove bdi->wb_lock grabbing around bdi->dev clearing and move it
after device_unregister() call so that bdi->dev doesn't have to be
cached in a local variable.

This patch shouldn't introduce any behavior difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
mm/backing-dev.c