loopdev: move common code into loop_figure_size()
authorGuo Chao <yan@linux.vnet.ibm.com>
Thu, 21 Feb 2013 23:16:47 +0000 (15:16 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Feb 2013 09:43:22 +0000 (10:43 +0100)
commit7b0576a3d835b4d46ed85d817ce016e90bf293a3
tree9c9d9780f3ef794e8d20d2057a722bcab843fad5
parent541c742a7559eb65f0e36d3e2338c2ca532a3e61
loopdev: move common code into loop_figure_size()

Update block device size in accord with gendisk size and let userspace
know the change in loop_figure_size(). This is a clean up to remove
common code of loop_figure_size()'s two callers.

Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Guo Chao <yan@linux.vnet.ibm.com>
Cc: M. Hindess <hindessm@uk.ibm.com>
Cc: Nikanth Karthikesan <knikanth@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c