From: Andrew Morton <akpm@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michael Kerrisk <mtk-manpages@gmx.net>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch 2/4] Timerfd v3 - new timerfd API
Date: Tue, 27 Nov 2007 01:02:54 -0800 [thread overview]
Message-ID: <20071127010254.133e222f.akpm@linux-foundation.org> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.18989.1196028860.2>
On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <davidel@xmailserver.org> wrote:
> +static struct file *timerfd_fget(int fd)
> +{
> + struct file *file;
> +
> + file = fget(fd);
> + if (!file)
> + return ERR_PTR(-EBADF);
> + if (file->f_op != &timerfd_fops) {
> + fput(file);
> + return ERR_PTR(-EINVAL);
> + }
> +
> + return file;
> +}
I suppose we could use fget_light() in here sometime. It is significantly
quicker in microbenchmarks. Or it was - nobody has checked that in a few
years afaik.
next prev parent reply other threads:[~2007-11-27 9:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 22:14 [patch 2/4] Timerfd v3 - new timerfd API Davide Libenzi
2007-11-27 9:02 ` Andrew Morton [this message]
2007-11-27 20:47 ` Davide Libenzi
2007-11-27 21:39 ` Andrew Morton
2007-11-27 23:51 ` 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=20071127010254.133e222f.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk-manpages@gmx.net \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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