On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <[EMAIL PROTECTED]> 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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/