From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard -rw- weinberger Subject: Re: [PATCH] epoll: remove unnecessary bit operation in epoll_create1 syscall Date: Wed, 12 Jan 2011 15:42:15 +0100 Message-ID: References: <1294829896-3210-1-git-send-email-namhyung@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Alexander Viro , Davide Libenzi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Namhyung Kim Return-path: In-Reply-To: <1294829896-3210-1-git-send-email-namhyung@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Jan 12, 2011 at 11:58 AM, Namhyung Kim wro= te: > @flags can have O_CLOEXEC only so bitwise AND is not necessary. > > Signed-off-by: Namhyung Kim > --- > =A0fs/eventpoll.c | =A0 =A02 +- > =A01 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) > =A0 =A0 =A0 =A0 * a file structure and a free file descriptor. > =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0error =3D anon_inode_getfd("[eventpoll]", &eventpoll_f= ops, ep, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0O_RD= WR | (flags & O_CLOEXEC)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0O_RD= WR | flags); I'm strong against this. Whenever a new flag is allowed this will explode... > =A0 =A0 =A0 =A0if (error < 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ep_free(ep); > > -- > 1.7.3.4.600.g982838b0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kerne= l" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at =A0http://vger.kernel.org/majordomo-info.html > Please read the FAQ at =A0http://www.tux.org/lkml/ > --=20 Thanks, //richard