summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2018-01-18 22:02:36 +0800
committerDavid Sterba <dsterba@suse.com>2018-01-29 19:31:16 +0100
commit3acbcbfc8f06d4ade2aab2ebba0a2542a05ce90c (patch)
treeca04ac74dca571d405b0da91da688b623381b2e7
parente124ece53edf3a80d594fa537d5c0a37b26f4eb7 (diff)
btrfs: drop devid as device_list_add() arg
As struct btrfs_disk_super is being passed, so it can get devid the same way its parent does. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/volumes.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 34c889a66240..b5036bd69e6a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -728,12 +728,13 @@ error_brelse:
* error pointer when failed
*/
static noinline struct btrfs_device *device_list_add(const char *path,
- struct btrfs_super_block *disk_super, u64 devid)
+ struct btrfs_super_block *disk_super)
{
struct btrfs_device *device;
struct btrfs_fs_devices *fs_devices;
struct rcu_string *name;
u64 found_transid = btrfs_super_generation(disk_super);
+ u64 devid = btrfs_stack_device_id(&disk_super->dev_item);
fs_devices = find_fsid(disk_super->fsid);
if (!fs_devices) {
@@ -1181,7 +1182,6 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
struct block_device *bdev;
struct page *page;
int ret = 0;
- u64 devid;
u64 bytenr;
/*
@@ -1205,9 +1205,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
goto error_bdev_put;
}
- devid = btrfs_stack_device_id(&disk_super->dev_item);
-
- device = device_list_add(path, disk_super, devid);
+ device = device_list_add(path, disk_super);
if (IS_ERR(device))
ret = PTR_ERR(device);
else