From: richard -rw- weinberger <richard.weinberger@gmail.com>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Davide Libenzi <davidel@xmailserver.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] epoll: remove unnecessary bit operation in epoll_create1 syscall
Date: Wed, 12 Jan 2011 15:42:15 +0100 [thread overview]
Message-ID: <AANLkTikgBBEznAh1CRwJk5MgorNFpXvRuVLyhYT6sQvw@mail.gmail.com> (raw)
In-Reply-To: <1294829896-3210-1-git-send-email-namhyung@gmail.com>
On Wed, Jan 12, 2011 at 11:58 AM, Namhyung Kim <namhyung@gmail.com> wrote:
> @flags can have O_CLOEXEC only so bitwise AND is not necessary.
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.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...
> if (error < 0)
> ep_free(ep);
>
> --
> 1.7.3.4.600.g982838b0
>
> --
> 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/
>
--
Thanks,
//richard
next prev parent reply other threads:[~2011-01-12 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 10:58 [PATCH] epoll: remove unnecessary bit operation in epoll_create1 syscall Namhyung Kim
2011-01-12 14:42 ` richard -rw- weinberger [this message]
2011-01-12 16:54 ` Davide Libenzi
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=AANLkTikgBBEznAh1CRwJk5MgorNFpXvRuVLyhYT6sQvw@mail.gmail.com \
--to=richard.weinberger@gmail.com \
--cc=davidel@xmailserver.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).