]> git.baikalelectronics.ru Git - kernel.git/commit
autofs4 - dont clear DCACHE_NEED_AUTOMOUNT on rootless mount
authorIan Kent <raven@themaw.net>
Fri, 14 Dec 2012 02:23:23 +0000 (10:23 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Dec 2012 03:13:25 +0000 (19:13 -0800)
commit13f0d9ae5ac978731daf73433feb48f5bafa3c5a
tree5ca3ab6c4c94c33f99934891c681c280778fb1c8
parentd8bd88f2c8d9ae3e245f327cfd5e0fbe12cfb7be
autofs4 - dont clear DCACHE_NEED_AUTOMOUNT on rootless mount

The DCACHE_NEED_AUTOMOUNT flag is cleared on mount and set on expire
for autofs rootless multi-mount dentrys to prevent unnecessary calls
to ->d_automount().

Since DCACHE_MANAGE_TRANSIT is always set on autofs dentrys ->d_managed()
is always called so the check can be done in ->d_manage() without the
need to change the flag. This still avoids unnecessary calls to
->d_automount(), adds negligible overhead and eliminates a seriously
ugly check in the expire code.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/expire.c
fs/autofs4/root.c