This moves quite a bit of code which does one thing into a helper.Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
We currently do not check for errors but we may decide that might
be desirable later.
This also makes the code easier to read.
This change has no functional changes.
Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
---
block/genhd.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)