lkml.org 
[lkml]   [2010]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 22/46] fs: dcache reduce locking in d_alloc
    Signed-off-by: Nick Piggin <npiggin@kernel.dk>
    ---
    fs/dcache.c | 6 ++++--
    1 files changed, 4 insertions(+), 2 deletions(-)

    diff --git a/fs/dcache.c b/fs/dcache.c
    index a117139..3e4f7c1 100644
    --- a/fs/dcache.c
    +++ b/fs/dcache.c
    @@ -1220,11 +1220,13 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)

    if (parent) {
    spin_lock(&parent->d_lock);
    - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
    + /*
    + * don't need child lock because it is not subject
    + * to concurrency here
    + */
    dentry->d_parent = dget_dlock(parent);
    dentry->d_sb = parent->d_sb;
    list_add(&dentry->d_u.d_child, &parent->d_subdirs);
    - spin_unlock(&dentry->d_lock);
    spin_unlock(&parent->d_lock);
    }

    --
    1.7.1


    \
     
     \ /
      Last update: 2010-11-27 11:31    [W:0.021 / U:90.484 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site