diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/autofs/autofs_i.h | 3 | ||||
-rw-r--r-- | fs/autofs/dirhash.c | 5 | ||||
-rw-r--r-- | fs/autofs/inode.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/fs/autofs/autofs_i.h b/fs/autofs/autofs_i.h index 6171431272dc..990c28da5aec 100644 --- a/fs/autofs/autofs_i.h +++ b/fs/autofs/autofs_i.h | |||
@@ -105,6 +105,7 @@ struct autofs_sb_info { | |||
105 | struct file *pipe; | 105 | struct file *pipe; |
106 | pid_t oz_pgrp; | 106 | pid_t oz_pgrp; |
107 | int catatonic; | 107 | int catatonic; |
108 | struct super_block *sb; | ||
108 | unsigned long exp_timeout; | 109 | unsigned long exp_timeout; |
109 | ino_t next_dir_ino; | 110 | ino_t next_dir_ino; |
110 | struct autofs_wait_queue *queues; /* Wait queue pointer */ | 111 | struct autofs_wait_queue *queues; /* Wait queue pointer */ |
@@ -134,7 +135,7 @@ void autofs_hash_insert(struct autofs_dirhash *,struct autofs_dir_ent *); | |||
134 | void autofs_hash_delete(struct autofs_dir_ent *); | 135 | void autofs_hash_delete(struct autofs_dir_ent *); |
135 | struct autofs_dir_ent *autofs_hash_enum(const struct autofs_dirhash *,off_t *,struct autofs_dir_ent *); | 136 | struct autofs_dir_ent *autofs_hash_enum(const struct autofs_dirhash *,off_t *,struct autofs_dir_ent *); |
136 | void autofs_hash_dputall(struct autofs_dirhash *); | 137 | void autofs_hash_dputall(struct autofs_dirhash *); |
137 | void autofs_hash_nuke(struct autofs_dirhash *); | 138 | void autofs_hash_nuke(struct autofs_sb_info *); |
138 | 139 | ||
139 | /* Expiration-handling functions */ | 140 | /* Expiration-handling functions */ |
140 | 141 | ||
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 */ |
235 | void autofs_hash_nuke(struct autofs_dirhash *dh) | 235 | void 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 | } |
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 4888c1fabbf7..65e5ed42190e 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c | |||
@@ -27,7 +27,7 @@ static void autofs_put_super(struct super_block *sb) | |||
27 | if ( !sbi->catatonic ) | 27 | if ( !sbi->catatonic ) |
28 | autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ | 28 | autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ |
29 | 29 | ||
30 | autofs_hash_nuke(&sbi->dirhash); | 30 | autofs_hash_nuke(sbi); |
31 | for ( n = 0 ; n < AUTOFS_MAX_SYMLINKS ; n++ ) { | 31 | for ( n = 0 ; n < AUTOFS_MAX_SYMLINKS ; n++ ) { |
32 | if ( test_bit(n, sbi->symlink_bitmap) ) | 32 | if ( test_bit(n, sbi->symlink_bitmap) ) |
33 | kfree(sbi->symlink[n].data); | 33 | kfree(sbi->symlink[n].data); |
@@ -148,6 +148,7 @@ int autofs_fill_super(struct super_block *s, void *data, int silent) | |||
148 | s->s_magic = AUTOFS_SUPER_MAGIC; | 148 | s->s_magic = AUTOFS_SUPER_MAGIC; |
149 | s->s_op = &autofs_sops; | 149 | s->s_op = &autofs_sops; |
150 | s->s_time_gran = 1; | 150 | s->s_time_gran = 1; |
151 | sbi->sb = s; | ||
151 | 152 | ||
152 | root_inode = iget(s, AUTOFS_ROOT_INO); | 153 | root_inode = iget(s, AUTOFS_ROOT_INO); |
153 | root = d_alloc_root(root_inode); | 154 | root = d_alloc_root(root_inode); |