diff options
author | Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2018-08-02 16:19:07 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:13:02 +0200 |
commit | 672d599041c862dd61a1576c32e946ef0d77aa34 (patch) | |
tree | 73d4d2cd0073a7c50ef7723e51393c825af2b43d /fs/btrfs/ioctl.c | |
parent | f5b3a4173ff624b766c56936bb315e1517603891 (diff) | |
download | linux-672d599041c862dd61a1576c32e946ef0d77aa34.tar.bz2 |
btrfs: Use wrapper macro for rcu string to remove duplicate code
Cleanup patch and no functional changes.
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 6eaadddaca9f..d3a5d2a41e5f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3157,10 +3157,8 @@ static long btrfs_ioctl_dev_info(struct btrfs_fs_info *fs_info, di_args->total_bytes = btrfs_device_get_total_bytes(dev); memcpy(di_args->uuid, dev->uuid, sizeof(di_args->uuid)); if (dev->name) { - struct rcu_string *name; - - name = rcu_dereference(dev->name); - strncpy(di_args->path, name->str, sizeof(di_args->path) - 1); + strncpy(di_args->path, rcu_str_deref(dev->name), + sizeof(di_args->path) - 1); di_args->path[sizeof(di_args->path) - 1] = 0; } else { di_args->path[0] = '\0'; |