aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-26 04:06:00 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:16:48 -0400
commite5a0726a953daf224ae42bcf5edaa64f71b4e8a7 (patch)
tree0f0be6f8e0b2324b5e29ac959837ab470afa0053 /fs/logfs/super.c
parent7d945a3aa7608f68dba04083d3421e0b43052660 (diff)
logfs: fix a leak in get_sb
a) switch ->put_device() to logfs_super * b) actually call it on early failures in logfs_get_sb_device() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/logfs/super.c')
-rw-r--r--fs/logfs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c
index f57a150b4779..f07d40e41c3f 100644
--- a/fs/logfs/super.c
+++ b/fs/logfs/super.c
@@ -529,7 +529,7 @@ static void logfs_kill_sb(struct super_block *sb)
529 logfs_cleanup_rw(sb); 529 logfs_cleanup_rw(sb);
530 if (super->s_erase_page) 530 if (super->s_erase_page)
531 __free_page(super->s_erase_page); 531 __free_page(super->s_erase_page);
532 super->s_devops->put_device(sb); 532 super->s_devops->put_device(super);
533 logfs_mempool_destroy(super->s_btree_pool); 533 logfs_mempool_destroy(super->s_btree_pool);
534 logfs_mempool_destroy(super->s_alias_pool); 534 logfs_mempool_destroy(super->s_alias_pool);
535 kfree(super); 535 kfree(super);
@@ -586,8 +586,8 @@ err1:
586 deactivate_locked_super(sb); 586 deactivate_locked_super(sb);
587 return err; 587 return err;
588err0: 588err0:
589 super->s_devops->put_device(super);
589 kfree(super); 590 kfree(super);
590 //devops->put_device(sb);
591 return err; 591 return err;
592} 592}
593 593