|
@@ -25,6 +25,14 @@ void autofs_kill_sb(struct super_block *sb)
|
|
struct autofs_sb_info *sbi = autofs_sbi(sb);
|
|
struct autofs_sb_info *sbi = autofs_sbi(sb);
|
|
unsigned int n;
|
|
unsigned int n;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * In the event of a failure in get_sb_nodev the superblock
|
|
|
|
+ * info is not present so nothing else has been setup, so
|
|
|
|
+ * just exit when we are called from deactivate_super.
|
|
|
|
+ */
|
|
|
|
+ if (!sbi)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if ( !sbi->catatonic )
|
|
if ( !sbi->catatonic )
|
|
autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */
|
|
autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */
|
|
|
|
|
|
@@ -136,7 +144,8 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
|
|
|
|
|
|
s->s_fs_info = sbi;
|
|
s->s_fs_info = sbi;
|
|
sbi->magic = AUTOFS_SBI_MAGIC;
|
|
sbi->magic = AUTOFS_SBI_MAGIC;
|
|
- sbi->catatonic = 0;
|
|
|
|
|
|
+ sbi->pipe = NULL;
|
|
|
|
+ sbi->catatonic = 1;
|
|
sbi->exp_timeout = 0;
|
|
sbi->exp_timeout = 0;
|
|
sbi->oz_pgrp = process_group(current);
|
|
sbi->oz_pgrp = process_group(current);
|
|
autofs_initialize_hash(&sbi->dirhash);
|
|
autofs_initialize_hash(&sbi->dirhash);
|
|
@@ -180,6 +189,7 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
|
|
if ( !pipe->f_op || !pipe->f_op->write )
|
|
if ( !pipe->f_op || !pipe->f_op->write )
|
|
goto fail_fput;
|
|
goto fail_fput;
|
|
sbi->pipe = pipe;
|
|
sbi->pipe = pipe;
|
|
|
|
+ sbi->catatonic = 0;
|
|
|
|
|
|
/*
|
|
/*
|
|
* Success! Install the root dentry now to indicate completion.
|
|
* Success! Install the root dentry now to indicate completion.
|
|
@@ -198,6 +208,8 @@ fail_iput:
|
|
iput(root_inode);
|
|
iput(root_inode);
|
|
fail_free:
|
|
fail_free:
|
|
kfree(sbi);
|
|
kfree(sbi);
|
|
|
|
+ s->s_fs_info = NULL;
|
|
|
|
+ kill_anon_super(s);
|
|
fail_unlock:
|
|
fail_unlock:
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|