lkml.org 
[lkml]   [2003]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [QUOTA] Drop spin lock when calling request_module
      Hi,

    > This patch drops the spin lock when calling request_module as the
    > latter will sleep.
    The patch looks right. Linus please apply if you find it serious
    enough (or Andrew please queue it up for next releases...)...

    Thanks
    Honza

    Index: kernel-source-2.5/fs/dquot.c
    ===================================================================
    RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/fs/dquot.c,v
    retrieving revision 1.3
    diff -u -r1.3 dquot.c
    --- kernel-source-2.5/fs/dquot.c 26 Oct 2003 03:20:37 -0000 1.3
    +++ kernel-source-2.5/fs/dquot.c 5 Nov 2003 11:04:30 -0000
    @@ -128,17 +128,21 @@
    if (!actqf || !try_module_get(actqf->qf_owner)) {
    int qm;

    + spin_unlock(&dq_list_lock);
    +
    for (qm = 0; module_names[qm].qm_fmt_id && module_names[qm].qm_fmt_id != id; qm++);
    if (!module_names[qm].qm_fmt_id || request_module(module_names[qm].qm_mod_name)) {
    actqf = NULL;
    goto out;
    }
    +
    + spin_lock(&dq_list_lock);
    for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
    if (actqf && !try_module_get(actqf->qf_owner))
    actqf = NULL;
    }
    -out:
    spin_unlock(&dq_list_lock);
    +out:
    return actqf;
    }
    -
    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/
    \
     
     \ /
      Last update: 2005-03-22 13:58    [W:0.027 / U:31.664 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site