--- ./fs/block_dev.c.bdopen 2006-10-17 14:49:18.000000000 +0400 +++ ./fs/block_dev.c 2006-10-20 17:32:14.000000000 +0400 @@ -1126,6 +1126,8 @@ static int blkdev_open(struct inode * in filp->f_flags |= O_LARGEFILE; bdev = bd_acquire(inode); + if (bdev == NULL) + return -ENOMEM; res = do_open(bdev, filp, BD_MUTEX_NORMAL); if (res)