lkml.org 
[lkml]   [2006]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 7/5] Optimise d_find_alias()
    David Howells <dhowells@redhat.com> wrote:
    >
    > struct dentry * d_find_alias(struct inode *inode)
    > {
    > - struct dentry *de;
    > - spin_lock(&dcache_lock);
    > - de = __d_find_alias(inode, 0);
    > - spin_unlock(&dcache_lock);
    > + struct dentry *de = NULL;
    > + if (!list_empty(&inode->i_dentry)) {
    > + spin_lock(&dcache_lock);
    > + de = __d_find_alias(inode, 0);
    > + spin_unlock(&dcache_lock);
    > + }
    > return de;
    > }

    How can we get away without a barrier?
    -
    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: 2006-03-03 12:49    [W:0.023 / U:0.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site