diff options
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r-- | fs/autofs4/inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index ce7c0f1dd529..e8f6c5ad3e90 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c | |||
@@ -152,10 +152,11 @@ void autofs4_kill_sb(struct super_block *sb) | |||
152 | /* | 152 | /* |
153 | * In the event of a failure in get_sb_nodev the superblock | 153 | * In the event of a failure in get_sb_nodev the superblock |
154 | * info is not present so nothing else has been setup, so | 154 | * info is not present so nothing else has been setup, so |
155 | * just exit when we are called from deactivate_super. | 155 | * just call kill_anon_super when we are called from |
156 | * deactivate_super. | ||
156 | */ | 157 | */ |
157 | if (!sbi) | 158 | if (!sbi) |
158 | return; | 159 | goto out_kill_sb; |
159 | 160 | ||
160 | sb->s_fs_info = NULL; | 161 | sb->s_fs_info = NULL; |
161 | 162 | ||
@@ -167,6 +168,7 @@ void autofs4_kill_sb(struct super_block *sb) | |||
167 | 168 | ||
168 | kfree(sbi); | 169 | kfree(sbi); |
169 | 170 | ||
171 | out_kill_sb: | ||
170 | DPRINTK("shutting down"); | 172 | DPRINTK("shutting down"); |
171 | kill_anon_super(sb); | 173 | kill_anon_super(sb); |
172 | } | 174 | } |
@@ -311,7 +313,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
311 | struct autofs_sb_info *sbi; | 313 | struct autofs_sb_info *sbi; |
312 | struct autofs_info *ino; | 314 | struct autofs_info *ino; |
313 | 315 | ||
314 | sbi = (struct autofs_sb_info *) kmalloc(sizeof(*sbi), GFP_KERNEL); | 316 | sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); |
315 | if ( !sbi ) | 317 | if ( !sbi ) |
316 | goto fail_unlock; | 318 | goto fail_unlock; |
317 | DPRINTK("starting up, sbi = %p",sbi); | 319 | DPRINTK("starting up, sbi = %p",sbi); |
@@ -426,7 +428,6 @@ fail_ino: | |||
426 | fail_free: | 428 | fail_free: |
427 | kfree(sbi); | 429 | kfree(sbi); |
428 | s->s_fs_info = NULL; | 430 | s->s_fs_info = NULL; |
429 | kill_anon_super(s); | ||
430 | fail_unlock: | 431 | fail_unlock: |
431 | return -EINVAL; | 432 | return -EINVAL; |
432 | } | 433 | } |