patch-2.1.37 linux/fs/autofs/inode.c

Next file: linux/fs/autofs/root.c
Previous file: linux/fs/autofs/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/fs/autofs/inode.c linux/fs/autofs/inode.c
@@ -15,7 +15,7 @@
 #include <linux/file.h>
 #include <linux/locks.h>
 #include <asm/bitops.h>
-#include <linux/auto_fs.h>
+#include "autofs_i.h"
 #define __NO_VERSION__
 #include <linux/module.h>
 
@@ -28,17 +28,19 @@
 
 static void autofs_put_super(struct super_block *sb)
 {
-	struct autofs_sb_info *sbi;
+	struct autofs_sb_info *sbi =
+		(struct autofs_sb_info *) sb->u.generic_sbp;
 	unsigned int n;
 
+	if ( !sbi->catatonic )
+		autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */
+
         lock_super(sb);
-	sbi = (struct autofs_sb_info *) sb->u.generic_sbp;
 	autofs_hash_nuke(&sbi->dirhash);
 	for ( n = 0 ; n < AUTOFS_MAX_SYMLINKS ; n++ ) {
 		if ( test_bit(n, sbi->symlink_bitmap) )
 			kfree(sbi->symlink[n].data);
 	}
-	fput(sbi->pipe, sbi->pipe->f_inode);
 
         sb->s_dev = 0;
 	kfree(sb->u.generic_sbp);
@@ -149,6 +151,7 @@
 
 	s->u.generic_sbp = sbi;
 	sbi->catatonic = 0;
+	sbi->exp_timeout = 0;
 	sbi->oz_pgrp = current->pgrp;
 	autofs_initialize_hash(&sbi->dirhash);
 	sbi->queues = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov