Re: [patch 1/1] sys_sync_file_range()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton <[email protected]> writes:

> +	if ((s64)offset < 0)
> +		goto out;
> +	if ((s64)endbyte < 0)
> +		goto out;

loff_t is long long on all arch. This is not need?

> +	if (S_ISFIFO(file->f_dentry->d_inode->i_mode)) {
> +		ret = -ESPIPE;
> +		goto out_put;
> +	}

How about to check "if (!file->f_op || !file->f_op->fsync)" or something?

For chrdev is also strange, and in the case of fsync(), it returns -EINVAL.
IMHO it seems there is consistency.

Thanks.
-- 
OGAWA Hirofumi <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux