summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2015-04-13 16:31:37 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-01-06 13:03:18 -0500
commita1c6f05733c27ba7067c06c095f49e8732a5ae17 (patch)
treecbe90c408ec3ae82d1f7d1531a4cf3287a580237 /fs/btrfs/super.c
parent1031bc589228ca35b3b6fb3dfe4656c0da5fbeb4 (diff)
downloadop-kernel-dev-a1c6f05733c27ba7067c06c095f49e8732a5ae17.zip
op-kernel-dev-a1c6f05733c27ba7067c06c095f49e8732a5ae17.tar.gz
fs: use block_device name vsprintf helper
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 24154e4..a0434c17 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1514,9 +1514,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
if ((flags ^ s->s_flags) & MS_RDONLY)
error = -EBUSY;
} else {
- char b[BDEVNAME_SIZE];
-
- strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id));
+ snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
btrfs_sb(s)->bdev_holder = fs_type;
error = btrfs_fill_super(s, fs_devices, data,
flags & MS_SILENT ? 1 : 0);
OpenPOWER on IntegriCloud