[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] aio: remove aio-max-nr and instead use the memlock rlimit to limit the number of pages pinned for the aio completion ring
    Benjamin LaHaise a écrit :
    > On Thu, Mar 12, 2009 at 04:24:42AM +0100, Eric Dumazet wrote:
    >> if (!IS_ERR(req->ki_eventfd))
    >> fput(req->ki_eventfd); /* BANG : can be called from interrupt context */
    > ...
    >> Thank you
    > That's a bug in the eventfd code, not aio. Davide: please fix.

    Hmm... what about fget_light() ... is it Davide fault too ?

    aio breaks the fget_light() concept too, if process is mono threaded.

    * Lightweight file lookup - no refcnt increment if fd table isn't shared.
    * You can use this only if it is guranteed that the current task already
    * holds a refcnt to that file. That check has to be done at fget() only
    * and a flag is returned to be passed to the corresponding fput_light().
    * There must not be a cloning between an fget_light/fput_light pair.
    struct file *fget_light(unsigned int fd, int *fput_needed)
    struct file *file;
    struct files_struct *files = current->files;

    *fput_needed = 0;
    if (likely((atomic_read(&files->count) == 1))) {
    file = fcheck_files(files, fd);
    } else {
    file = fcheck_files(files, fd);
    if (file) {
    if (atomic_long_inc_not_zero(&file->f_count))
    *fput_needed = 1;
    /* Didn't get the reference, someone's freed */
    file = NULL;

    return file;

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-03-12 04:37    [W:0.027 / U:130.300 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site