mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: neilb@suse.de, linux-kernel@vger.kernel.org, drepper@redhat.com,
	mtk-manpages@gmx.net, nickpiggin@yahoo.com.au
Subject: Re: [patch 1/1] sys_sync_file_range()
Date: Thu, 30 Mar 2006 12:19:03 -0800	[thread overview]
Message-ID: <20060330121903.643352ac.akpm@osdl.org> (raw)
In-Reply-To: <87d5g4rlth.fsf@duaron.myhome.or.jp>

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.

  reply	other threads:[~2006-03-30 20:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30  7:41 akpm
2006-03-30  7:58 ` Neil Brown
2006-03-30  8:11   ` Andrew Morton
2006-03-30  8:32   ` Andrew Morton
2006-03-30  8:55     ` Neil Brown
2006-03-30 15:31     ` OGAWA Hirofumi
2006-03-30 20:19       ` Andrew Morton [this message]
2006-03-30 21:17   ` Nathan Scott
2006-04-03  1:24     ` Neil Brown
2006-04-03  7:50       ` Jens Axboe
2006-04-03  8:27         ` Andrew Morton
2006-04-03 14:31           ` Jens Axboe
2006-04-03 21:21             ` Andrew Morton
2006-04-04 20:50 ` Luck, Tony
2006-04-04 21:00   ` Andrew Morton
2006-04-04 21:01   ` Randy.Dunlap
2006-04-04 21:03   ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060330121903.643352ac.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-manpages@gmx.net \
    --cc=neilb@suse.de \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome