OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-3235-g370aaae

Gerrit Code Review gerrit@openafs.org
Fri, 28 Dec 2012 12:05:58 -0800 (PST)


The following commit has been merged in the master branch:
commit 370aaaeafa43f804b0a5286d92b4ec5f1ccb62be
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Wed Dec 12 16:14:55 2012 -0600

    LINUX: Avoid infinite d_invalidate loop
    
    In afs_linux_lookup, we try to invalidate as many dentry aliases as we
    can. However, a successful d_invalidate() against a dentry does not
    necessarily mean that the dentry will not show up in a later
    d_find_alias() call. This is because d_invalidate() does not remove
    the dentry from the d_alias list, but just removes it from the hash
    chain. dput() is what removes it from the d_alias list when all of the
    references go away. If a reference is grabbed between our
    d_invalidate() and dput() calls, the dentry will stay on the d_alias
    list.
    
    We will then retry the loop, and we will get the same dentry back from
    d_find_alias(). Running d_invalidate() on an unhashed dentry is a
    no-op, so we don't change anything in the loop. We will retry again
    and again, looping forever and spinning the CPU.
    
    To avoid this, just call d_prune_aliases instead, instead of
    repeatedly looping through the alias list ourselves. Note that this
    does remove our check for DCACHE_DISCONNECTED in each alias' d_flags.
    This should not be a problem, since we will still use any remaining
    DCACHE_DISCONNECTED dentry via d_splice_alias if one still exists.
    
    Change-Id: I8a09a922d07f2c4971269f3c681c748c33bf8e3d
    Reviewed-on: http://gerrit.openafs.org/8751
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
    Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

 src/afs/LINUX/osi_vnodeops.c   |   19 +------------------
 src/afs/LINUX24/osi_vnodeops.c |   19 +------------------
 2 files changed, 2 insertions(+), 36 deletions(-)

-- 
OpenAFS Master Repository