btrfs: create a helper function to read the disk super
authorAnand Jain <anand.jain@oracle.com>
Sat, 13 Feb 2016 02:01:29 +0000 (10:01 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Apr 2016 08:59:04 +0000 (10:59 +0200)
commit6cf86a006be9f2a77434d5a06ea289719815ad7c
tree169d42512bc7185e91bd03ab3ea95f5caf8f9c23
parent02da2d72174c61988eb4456b53f405e3ebdebce4
btrfs: create a helper function to read the disk super

A part of code from btrfs_scan_one_device() is moved to a new function
btrfs_read_disk_super(), so that former function looks cleaner. (In this
process it also moves the code which ensures null terminating label). So
this creates easy opportunity to merge various duplicate codes on read
disk super. Earlier attempt to merge duplicate codes highlighted that
there were some issues for which there are duplicate codes (to read disk
super), however it was not clear what was the issue. So until we figure
that out, its better to keep them in a separate functions.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ use GFP_KERNEL, PAGE_CACHE_ removal related fixups ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c