Re: sparc/staging compile error

Christoph Hellwig
2008-11-06T17:32:52Z

On Thu, Nov 06, 2008 at 09:06:36AM -0500, J.R. Mauro wrote:
> static int poch_ioctl(struct inode *inode, struct file *filp,
> unsigned int cmd, unsigned long arg)
> {
> /* ---snip---*/
> case POCH_IOC_SYNC_GROUP_FOR_USER:
> case POCH_IOC_SYNC_GROUP_FOR_DEVICE:
> vms = find_vma(current->mm, arg);
> if (!vms)
> /* Address not mapped. */
> return -EINVAL;
> if (vms->vm_file != filp)
> /* Address mapped from different device/file. */
> return -EINVAL;
>
> flush_cache_range(vms, arg, arg + channel->group_size);

This doesn't look like something a driver should ever do. Could someone
explain what it's trying to do from a high level point of view?