NBD fixes based on v4.0-rc1
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJU+As6AAoJEEpcgKtcEGQQr5UQAJeNbwo3t45u+ftmL+rzznqr ospLlVirYqKcB3IZk8WUZ+xWtP2EyzJ6qiTPdYRC2lvgQMDiXTpqYkbi4lNCUr0V CBMVSWuOwlZOwlD0Cxr5L6m2A0X+M8aGI1OUISYZuogLaHxjgPRQiEs5vccQKcoF 1ZHBg0Lguk+alfTLxEtddDfzETx72I+CRaJyxa/g9SNk91C1R8U/+YT6g9ryrF9H 8bJ5K4p5LYJDecIZMTNTFCndNa1fFZmynDv4cvla0MOfrOwA+lSaIFdCtbSPEbUu WHjXzwDlsIKGjJY1Pt7YfND1B+khFSVS9Cgh11hQ0nOer6y3WRIxWg0Jyo7m+PUz W4J7Pd1sHr/IgPLLOOI0o21n+Glkqp/wh5O/mDEP0ZEWMpm4pdd2R+UX76Fv62QT YCKcYl/0oxbSPjLBKWZLw2hhmd/NRvU4GM7r/mHtQvOxrHEQf5HW9p4ZlQvU7GV3 kSYZwbMZo/FsiP1KCC/VSv3l+BQJMcZRlBRg0pzSJTvZmGEaBSvydLd7lsV05OsJ txmmDw7Xd14rT8Uav83i9olXuZGX8tK+QDOdQxY7SMXmEiMWre1B4pvJu10lXrmo tmZ9zPEQyWdcsuf/og8coSk3QKQlqHHmlcdtz9WZKqUHbvE0l4g8GWS9OWBdyGR5 RXpfcbwvd396f9JXxxob =ttVz -----END PGP SIGNATURE----- Merge tag 'nbd_fixes_20150305' of git://git.pengutronix.de/git/mpa/linux-nbd into for-linus NBD fixes based on v4.0-rc1
This commit is contained in:
commit
b8be79b714
|
@ -803,10 +803,6 @@ static int __init nbd_init(void)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
if (!nbd_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
part_shift = 0;
|
||||
if (max_part > 0) {
|
||||
part_shift = fls(max_part);
|
||||
|
@ -828,6 +824,10 @@ static int __init nbd_init(void)
|
|||
if (nbds_max > 1UL << (MINORBITS - part_shift))
|
||||
return -EINVAL;
|
||||
|
||||
nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
if (!nbd_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < nbds_max; i++) {
|
||||
struct gendisk *disk = alloc_disk(1 << part_shift);
|
||||
if (!disk)
|
||||
|
|
Loading…
Reference in New Issue