lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/1] sys_sync_file_range()
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
>
> Andrew Morton <akpm@osdl.org> 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?

True, the casts happen to be unneeded. But they do set the reader's mind
at ease.

> > + 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?

This syscall won't call ->fsync.

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

I guess so. Perhaps it should be S_ISREG|S_ISBLK|S_ISDIR|S_ISLNK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-30 22:22    [W:0.122 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site