diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 12:06:00 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:48 -0400 |
commit | e5a0726a953daf224ae42bcf5edaa64f71b4e8a7 (patch) | |
tree | 0f0be6f8e0b2324b5e29ac959837ab470afa0053 /fs/logfs/super.c | |
parent | 7d945a3aa7608f68dba04083d3421e0b43052660 (diff) | |
download | linux-e5a0726a953daf224ae42bcf5edaa64f71b4e8a7.tar.gz linux-e5a0726a953daf224ae42bcf5edaa64f71b4e8a7.tar.bz2 linux-e5a0726a953daf224ae42bcf5edaa64f71b4e8a7.zip |
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.c | 4 |
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) logfs_cleanup_rw(sb); if (super->s_erase_page) __free_page(super->s_erase_page); - super->s_devops->put_device(sb); + super->s_devops->put_device(super); logfs_mempool_destroy(super->s_btree_pool); logfs_mempool_destroy(super->s_alias_pool); kfree(super); @@ -586,8 +586,8 @@ err1: deactivate_locked_super(sb); return err; err0: + super->s_devops->put_device(super); kfree(super); - //devops->put_device(sb); return err; } |