[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1101120853090.26965@davide-lnx1>
Date: Wed, 12 Jan 2011 08:54:41 -0800 (PST)
From: Davide Libenzi <davidel@...ilserver.org>
To: richard -rw- weinberger <richard.weinberger@...il.com>
cc: Namhyung Kim <namhyung@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] epoll: remove unnecessary bit operation in epoll_create1
syscall
On Wed, 12 Jan 2011, richard -rw- weinberger wrote:
> On Wed, Jan 12, 2011 at 11:58 AM, Namhyung Kim <namhyung@...il.com> wrote:
> > @flags can have O_CLOEXEC only so bitwise AND is not necessary.
> >
> > Signed-off-by: Namhyung Kim <namhyung@...il.com>
> > ---
> > fs/eventpoll.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> > index 8cf07242067d..2e21fb85b8b6 100644
> > --- a/fs/eventpoll.c
> > +++ b/fs/eventpoll.c
> > @@ -1209,7 +1209,7 @@ SYSCALL_DEFINE1(epoll_create1, int, flags)
> > * a file structure and a free file descriptor.
> > */
> > error = anon_inode_getfd("[eventpoll]", &eventpoll_fops, ep,
> > - O_RDWR | (flags & O_CLOEXEC));
> > + O_RDWR | flags);
>
> I'm strong against this.
> Whenever a new flag is allowed this will explode...
His point might be that there is a check right ahead, so flags can't be
enything outside such mask.
But yeah, this is not worth creating another couple of objects in the GIT
tree IMO.
- Davide
Powered by blists - more mailing lists