Core Linux code for managing char-devs ensures that the relevant
module is held active while a char-dev is open - see cdev_get()
and cdev_put().
So there is no need for lustre/obd_class to manage the module
ref count as well.
As this is all that obd_class_open and obd_class_close do, those
functions can be removed.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I84b0dc81c830cefc2383f184d12beeb2cfa22404
Reviewed-on: https://review.whamcloud.com/37021
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
RETURN(err);
} /* class_handle_ioctl */
RETURN(err);
} /* class_handle_ioctl */
-/* opening /dev/obd */
-static int obd_class_open(struct inode * inode, struct file * file)
-{
- ENTRY;
- try_module_get(THIS_MODULE);
- RETURN(0);
-}
-
-/* closing /dev/obd */
-static int obd_class_release(struct inode * inode, struct file * file)
-{
- ENTRY;
-
- module_put(THIS_MODULE);
- RETURN(0);
-}
-
/* to control /dev/obd */
static long obd_class_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
/* to control /dev/obd */
static long obd_class_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
static struct file_operations obd_psdev_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = obd_class_ioctl, /* unlocked_ioctl */
static struct file_operations obd_psdev_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = obd_class_ioctl, /* unlocked_ioctl */
- .open = obd_class_open, /* open */
- .release = obd_class_release, /* release */