[PATCH] 2.5.1-pre3 fix error in drivers/block/rd.c

Anton Altaparmakov (aia21@cus.cam.ac.uk)
Thu, 29 Nov 2001 00:37:15 +0000 (GMT)


Linus,

I think someone made a very silly mistake which this patchlet fixes.
Taking a spinlock and returning from a function before releasing it...

Best regards,

Anton

-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

--- linux-2.5.1-pre3-vanilla/drivers/block/rd.c.old Thu Nov 29 00:34:17 2001 +++ linux-2.5.1-pre3-vanilla/drivers/block/rd.c Thu Nov 29 00:35:03 2001 @@ -437,9 +437,9 @@ #ifdef CONFIG_BLK_DEV_INITRD if (unit == INITRD_MINOR) { + if (!initrd_start) return -ENODEV; spin_lock( &initrd_users_lock ); initrd_users++; - if (!initrd_start) return -ENODEV; spin_unlock( &initrd_users_lock ); filp->f_op = &initrd_fops; return 0; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/