fs: use block_device name vsprintf helper
[linux-2.6-block.git] / fs / gfs2 / ops_fstype.c
index baab99b69d8ae3b56e7c74646d9c3783c1d3e3e7..001c6664124302189a0a6a10eddfd3fc4102ff05 100644 (file)
@@ -1315,9 +1315,7 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,
                if ((flags ^ s->s_flags) & MS_RDONLY)
                        goto error_super;
        } 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);
                sb_set_blocksize(s, block_size(bdev));
                error = fill_super(s, &args, flags & MS_SILENT ? 1 : 0);
                if (error)