diff options
-rw-r--r-- | drivers/block/rbd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 0d80967e140c..d833d02b321f 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1721,7 +1721,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) | |||
1721 | if (!disk) | 1721 | if (!disk) |
1722 | goto out; | 1722 | goto out; |
1723 | 1723 | ||
1724 | sprintf(disk->disk_name, DRV_NAME "%d", rbd_dev->id); | 1724 | snprintf(disk->disk_name, sizeof(disk->disk_name), DRV_NAME "%d", |
1725 | rbd_dev->id); | ||
1725 | disk->major = rbd_dev->major; | 1726 | disk->major = rbd_dev->major; |
1726 | disk->first_minor = 0; | 1727 | disk->first_minor = 0; |
1727 | disk->fops = &rbd_bd_ops; | 1728 | disk->fops = &rbd_bd_ops; |