• M
    vfs: fix d_ancestor() case in d_materialize_unique · b18dafc8
    Michel Lespinasse 提交于
    In d_materialise_unique() there are 3 subcases to the 'aliased dentry'
    case; in two subcases the inode i_lock is properly released but this
    does not occur in the -ELOOP subcase.
    
    This seems to have been introduced by commit 18367501 ("fix loop
    checks in d_materialise_unique()").
    Signed-off-by: NMichel Lespinasse <walken@google.com>
    Cc: stable@vger.kernel.org # v3.0+
    [ Added a comment, and moved the unlock to where we generate the -ELOOP,
      which seems to be more natural.
    
      You probably can't actually trigger this without a buggy network file
      server - d_materialize_unique() is for finding aliases on non-local
      filesystems, and the d_ancestor() case is for a hardlinked directory
      loop.
    
      But we should be robust in the case of such buggy servers anyway. ]
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    b18dafc8
dcache.c 77.3 KB