btrfs: get fs_info from device in btrfs_rm_dev_item
We can read fs_info from the device and can drop it from the parameters. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -1941,10 +1941,9 @@ static void update_dev_time(const char *path_name)
|
|||||||
filp_close(filp, NULL);
|
filp_close(filp, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int btrfs_rm_dev_item(struct btrfs_fs_info *fs_info,
|
static int btrfs_rm_dev_item(struct btrfs_device *device)
|
||||||
struct btrfs_device *device)
|
|
||||||
{
|
{
|
||||||
struct btrfs_root *root = fs_info->chunk_root;
|
struct btrfs_root *root = device->fs_info->chunk_root;
|
||||||
int ret;
|
int ret;
|
||||||
struct btrfs_path *path;
|
struct btrfs_path *path;
|
||||||
struct btrfs_key key;
|
struct btrfs_key key;
|
||||||
@@ -2145,7 +2144,7 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
|
|||||||
* counter although write_all_supers() is not locked out. This
|
* counter although write_all_supers() is not locked out. This
|
||||||
* could give a filesystem state which requires a degraded mount.
|
* could give a filesystem state which requires a degraded mount.
|
||||||
*/
|
*/
|
||||||
ret = btrfs_rm_dev_item(fs_info, device);
|
ret = btrfs_rm_dev_item(device);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_undo;
|
goto error_undo;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user