/* Quick check whether there are still any locks, blocks or shares on a given file.  */
static int nlm_file_inuse(struct nlm_file *file)
/* Quick check whether there are still any locks, blocks or shares on a given file.  */
static int nlm_file_inuse(struct nlm_file *file)
{
	struct inode	 *inode = nlmsvc_file_inode(file);
	struct file_lock *fl;
	if (file->f_count || !list_empty(&file->f_blocks) || file->f_shares)
		return 1;
	for (fl = inode->i_flock; fl; fl = fl->fl_next) {
		if (fl->fl_lmops == &nlmsvc_lock_operations)
			return 1;
	}
	file->f_locks = 0;
	return 0;
}