if (pd->refcnt == 1) { 
if (pd->refcnt > 1) { if ((file->f_mode & FMODE_WRITE) && !test_bit(PACKET_WRITABLE, &pd->flags)) { ret = -EBUSY; goto out_dec; } } else { 
static int pkt_open(struct inode *inode, struct file *file){	struct pktcdvd_device *pd = NULL;	int ret;	VPRINTK("pktcdvd: entering open\n");	down(&ctl_mutex);	pd = pkt_find_dev_from_minor(iminor(inode));	if (!pd) {		ret = -ENODEV;		goto out;	}	BUG_ON(pd->refcnt < 0);	pd->refcnt++;	if (pd->refcnt == 1) {		if (pkt_open_dev(pd, file->f_mode & FMODE_WRITE)) {			ret = -EIO;			goto out_dec;		}		/*		 * needed here as well, since ext2 (among others) may change		 * the blocksize at mount time		 */		set_blocksize(inode->i_bdev, CD_FRAMESIZE);	}	up(&ctl_mutex);	return 0;out_dec:	pd->refcnt--;out:	VPRINTK("pktcdvd: failed open (%d)\n", ret);	up(&ctl_mutex);	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/46f4e1b7d5fa3ddf2486bf69716c404147e38ebf/pktcdvd.c/clean/drivers/block/pktcdvd.c