LINUX: Avoid symlink-y resolution limits
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Aug 2012 22:03:30 +0000 (17:03 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 5 Sep 2012 19:00:51 +0000 (12:00 -0700)
commit238b88624a8fef39557d397cc336c88bd8efc5b1
tree87fb755ea36c0eb4aee498be54c05f9a76e96995
parentb9a10641dd75fed9bbcd27f6ddbb2b9246f25fe7
LINUX: Avoid symlink-y resolution limits

Implementing the d_automount or follow_link function pointers for our
directories means that we can hit symlink resolution limits during
lookup, since we look like a "symlink". We can hit these limits pretty
easily if there are just too many directories in the lookup path.

Our pseudo-symlink directories cannot contribute to an infinite
resolution loop, since our destination is always an actual directory,
not a symlink that will result in more redirection. So, decrement the
total_link_count counter when our d_automount or follow_link code is
reached, so we do not contribute to hitting the max resolution limit.

Note that this is not related to recursive symlink lookup (link_count)
but only to the iterative symlink limit (total_link_count). Our
lookups are not recursive here, and we are not causing more recursive
lookups like a normal text-based symlink would do.

Change-Id: Id6d2edd614388ac0890eb7591caec25d375964ce
Reviewed-on: http://gerrit.openafs.org/8009
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/LINUX/osi_vnodeops.c