/* "id" is the POSIX thread ID. We use the files pointer for this..  */
int filp_close(struct file *filp, fl_owner_t id)
/* "id" is the POSIX thread ID. We use the files pointer for this..  */
int filp_close(struct file *filp, fl_owner_t id)
{
	int retval = 0;
	if (!file_count(filp)) {
		printk(KERN_ERR "VFS: Close: file count is 0\n");
		return 0;
	}
	if (filp->f_op && filp->f_op->flush)
		retval = filp->f_op->flush(filp, id);
	dnotify_flush(filp, id);
	locks_remove_posix(filp, id);
	fput(filp);
	return retval;
}