aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/dirhash.c
diff options
context:
space:
mode:
authorAlexander Krizhanovsky <klx@yandex.ru>2005-09-09 16:01:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:31 -0400
commitf76baf9365bd66216bf0e0ebfc083e22eda6215b (patch)
tree0c6bcbf6cbb233e7c355d72c7e25e9e516c32f85 /fs/autofs/dirhash.c
parent28254d439b8c65f93cb331f5aa741efa6a8ec62f (diff)
[PATCH] autofs: fix "busy inodes after umount..."
This patch for old autofs (version 3) cleans dentries which are not putted after killing the automount daemon (it's analogue of recent patch for autofs4). Signed-off-by: Alexander Krizhanovsky <klx@yandex.ru> Cc: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/autofs/dirhash.c')
-rw-r--r--fs/autofs/dirhash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/autofs/dirhash.c b/fs/autofs/dirhash.c
index 448143fd0796..5ccfcf26310d 100644
--- a/fs/autofs/dirhash.c
+++ b/fs/autofs/dirhash.c
@@ -232,13 +232,13 @@ void autofs_hash_dputall(struct autofs_dirhash *dh)
232 232
233/* Delete everything. This is used on filesystem destruction, so we 233/* Delete everything. This is used on filesystem destruction, so we
234 make no attempt to keep the pointers valid */ 234 make no attempt to keep the pointers valid */
235void autofs_hash_nuke(struct autofs_dirhash *dh) 235void autofs_hash_nuke(struct autofs_sb_info *sbi)
236{ 236{
237 int i; 237 int i;
238 struct autofs_dir_ent *ent, *nent; 238 struct autofs_dir_ent *ent, *nent;
239 239
240 for ( i = 0 ; i < AUTOFS_HASH_SIZE ; i++ ) { 240 for ( i = 0 ; i < AUTOFS_HASH_SIZE ; i++ ) {
241 for ( ent = dh->h[i] ; ent ; ent = nent ) { 241 for ( ent = sbi->dirhash.h[i] ; ent ; ent = nent ) {
242 nent = ent->next; 242 nent = ent->next;
243 if ( ent->dentry ) 243 if ( ent->dentry )
244 dput(ent->dentry); 244 dput(ent->dentry);
@@ -246,4 +246,5 @@ void autofs_hash_nuke(struct autofs_dirhash *dh)
246 kfree(ent); 246 kfree(ent);
247 } 247 }
248 } 248 }
249 shrink_dcache_sb(sbi->sb);
249} 250}