From: Ed Cashin Date: Thu, 29 Nov 2012 03:19:11 +0000 (+1100) Subject: aoe: return real minor number for static minors X-Git-Tag: next-20121205~1^2~36 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e65bbcb57c6a68f9df53b9718e0f6c7c9c3b668c;p=karo-tx-linux.git aoe: return real minor number for static minors The value returned by the static minor device number number allocator is the real minor number, so it must be multiplied by the supported number of partitions per aoedev. Without this fix the support for systems without udev is incomplete, and the few users of aoe on such systems will have surprising results when device nodes names do not match the AoE target. Signed-off-by: Ed Cashin Signed-off-by: Andrew Morton --- diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index 80b3d3ea10c3..aaaea662a72a 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -95,7 +95,7 @@ minor_get_static(ulong *sysminor, ulong aoemaj, int aoemin) } else set_bit(n, used_minors); spin_unlock_irqrestore(&used_minors_lock, flags); - *sysminor = n; + *sysminor = n * AOE_PARTITIONS; out: return error; }