diff options
author | Michel Lespinasse <walken@google.com> | 2012-03-26 17:32:44 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-02 09:53:04 -0700 |
commit | d27e4c282e8445be329e4e3544ea5e9d4dfdc953 (patch) | |
tree | e5c1f1d53876bed65b519c2039c9b682a89eb7eb /lib/flex_array.c | |
parent | ac35405d20c0bd438cea6e9dddd84335370c739e (diff) |
vfs: fix d_ancestor() case in d_materialize_unique
commit b18dafc86bb879d2f38a1743985d7ceb283c2f4d upstream.
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 1836750115f2 ("fix loop
checks in d_materialise_unique()").
Signed-off-by: Michel Lespinasse <walken@google.com>
[ 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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions