if (atomic_dec_and_test(&lo->lo_pending)) 
lo->lo_pending--; if (!lo->lo_pending) 
static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev){	struct file *filp = lo->lo_backing_file;	int gfp = lo->old_gfp_mask;	if (lo->lo_state != Lo_bound)		return -ENXIO;	if (lo->lo_refcnt > 1)	/* we needed one fd for the ioctl */		return -EBUSY;	if (filp == NULL)		return -EINVAL;	spin_lock_irq(&lo->lo_lock);	lo->lo_state = Lo_rundown;	if (atomic_dec_and_test(&lo->lo_pending))		up(&lo->lo_bh_mutex);	spin_unlock_irq(&lo->lo_lock);	down(&lo->lo_sem);	lo->lo_backing_file = NULL;	loop_release_xfer(lo);	lo->transfer = NULL;	lo->ioctl = NULL;	lo->lo_device = NULL;	lo->lo_encryption = NULL;	lo->lo_offset = 0;	lo->lo_sizelimit = 0;	lo->lo_encrypt_key_size = 0;	lo->lo_flags = 0;	memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);	memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);	memset(lo->lo_file_name, 0, LO_NAME_SIZE);	invalidate_bdev(bdev, 0);	set_capacity(disks[lo->lo_number], 0);	bd_set_size(bdev, 0);	mapping_set_gfp_mask(filp->f_mapping, gfp);	lo->lo_state = Lo_unbound;	fput(filp);	/* This is safe: open() is still holding a reference. */	module_put(THIS_MODULE);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/35a82d1a53e1a9ad54efafcc940f9335beaed5c3/loop.c/buggy/drivers/block/loop.c