Re: EXPORT_SYMBOL for chrdev_open 2.4.3

From: Alexander Viro (viro@math.psu.edu)
Date: Fri Apr 13 2001 - 20:29:43 EST


On Fri, 13 Apr 2001, Jeff V. Merkey wrote:

> How are folks supposed to open disk and tape devices from kernel modules
> without these? Not everything should be done in user space Al. If you

Normally - filp_open(). If all you want is ioctl on block device -
blkdev_get() + ioctl_by_bdev() + blkdev_put(). If you want it by
device _number_ - use bdget().

> remove blkdev_open I will not be able to properly increment the use
> count an a disk device I may be reading or writing to.

        Yes, you will. And I would _really_ advice you to do that by
name instead of device number - that way you will avoid a lot of pain
couple of years down the road.

-
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/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:22 EST