/* returns 1: locks held by lockowner 0: no locks held by lockowner  */
static int check_for_locks(struct file *filp, struct nfs4_stateowner *lowner)
/* returns 1: locks held by lockowner 0: no locks held by lockowner  */
static int check_for_locks(struct file *filp, struct nfs4_stateowner *lowner)
{
	struct file_lock **flpp;
	struct inode *inode = filp->f_path.dentry->d_inode;
	int status = 0;
	lock_kernel();
	for (flpp = &inode->i_flock; *flpp != NULL; flpp = &(*flpp)->fl_next) {
		if ((*flpp)->fl_owner == (fl_owner_t)lowner) {
			status = 1;
			goto out;
		}
	}
out:
	unlock_kernel();
	return status;
}