X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fclass_obd.c;h=68d586f5ce94f24d9826a2e540128158b2e76340;hp=f597be760989530cc5f84efaf007b197073fff28;hb=fa37df355722e22eb4e51684e6af7ee2970e58bc;hpb=5bf6eb994ec6136b5fe64446d6bf673e4c3e7cbd diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index f597be7..68d586f 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -74,7 +74,7 @@ static int obd_class_open(struct inode * inode, struct file * file) if (dev >= MAX_OBD_DEVICES) return -ENODEV; obd_dev[dev].obd_refcnt++; - CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt++); + CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt); MOD_INC_USE_COUNT; EXIT; @@ -94,12 +94,11 @@ static int obd_class_release(struct inode * inode, struct file * file) return -ENODEV; fsync_dev(inode->i_rdev); if (obd_dev[dev].obd_refcnt <= 0) - printk(KERN_ALERT "presto_psdev_release: refcount(%d) <= 0\n", + printk(KERN_ALERT "obd_class_release: refcount(%d) <= 0\n", obd_dev[dev].obd_refcnt); obd_dev[dev].obd_refcnt--; - CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt++); - + CDEBUG(D_PSDEV, "Refcount now %d\n", obd_dev[dev].obd_refcnt); MOD_DEC_USE_COUNT; EXIT; @@ -452,6 +451,7 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, obddev->obd_type->typ_name); if ( !obddev->obd_type->typ_ops || !obddev->obd_type->typ_ops->o_setup ) { + obddev->obd_type->typ_refcnt++; obddev->obd_flags |= OBD_SET_UP; return 0; }