From: NeilBrown Date: Mon, 13 Oct 2014 22:52:22 +0000 (-0700) Subject: autofs4: d_manage() should return -EISDIR when appropriate in rcu-walk mode. X-Git-Tag: fixes-against-v3.18-rc2~79^2~95 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef16cc5909c907586f4eba5455e183fd319637c8;p=pandora-kernel.git autofs4: d_manage() should return -EISDIR when appropriate in rcu-walk mode. If rcu-walk mode we don't *have* to return -EISDIR for non-mount-traps as we will simply drop into REF-walk and handling DCACHE_NEED_AUTOMOUNT dentrys the slow way. But it is better if we do when possible. In 'oz_mode', use the same condition as ref-walk: if not a mountpoint, then it must be -EISDIR. In regular mode there are most tests needed. Most of them can be performed without taking any spinlocks. If we find a directory that isn't obviously empty, and isn't mounted on, we need to call 'simple_empty()' which does take a spinlock. If this turned out to hurt performance, some other approach could be found to signal when a directory is known to be empty. Signed-off-by: NeilBrown Reviewed-by: Ian Kent Tested-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed