fs: use block_device name vsprintf helper
[linux-2.6-block.git] / fs / btrfs / super.c
index 24154e422945167f474557887c62acaf6ed0779c..a0434c179ea96b9f1308e7034066202b30cb4267 100644 (file)
@@ -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);