put_unused_fd(fd); 
asmlinkage long sys_inotify_init(void){	struct inotify_device *dev;	struct user_struct *user;	struct file *filp;		int fd, ret;	fd = get_unused_fd();	if (fd < 0)		return fd;	filp = get_empty_filp();	if (!filp) {		put_unused_fd(fd);		ret = -ENFILE;		goto out;	}	user = get_uid(current->user);	if (unlikely(atomic_read(&user->inotify_devs) >=			inotify_max_user_instances)) {		ret = -EMFILE;		goto out_err;	}	dev = kmalloc(sizeof(struct inotify_device), GFP_KERNEL);	if (unlikely(!dev)) {		ret = -ENOMEM;		goto out_err;	}	filp->f_op = &inotify_fops;	filp->f_vfsmnt = mntget(inotify_mnt);	filp->f_dentry = dget(inotify_mnt->mnt_root);	filp->f_mapping = filp->f_dentry->d_inode->i_mapping;	filp->f_mode = FMODE_READ;	filp->f_flags = O_RDONLY;	filp->private_data = dev;	idr_init(&dev->idr);	INIT_LIST_HEAD(&dev->events);	INIT_LIST_HEAD(&dev->watches);	init_waitqueue_head(&dev->wq);	sema_init(&dev->sem, 1);	dev->event_count = 0;	dev->queue_size = 0;	dev->max_events = inotify_max_queued_events;	dev->user = user;	atomic_set(&dev->count, 0);	get_inotify_dev(dev);	atomic_inc(&user->inotify_devs);	fd_install(fd, filp);	return fd;out_err:	put_unused_fd (fd);	put_filp (filp);	free_uid(user);out:	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5eb22cbcdb849886c2584389faff5afb56c23876/inotify.c/clean/fs/inotify.c