diff options
author | Joern Engel <joern@logfs.org> | 2010-04-15 02:03:57 -0400 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2010-04-15 02:03:57 -0400 |
commit | 1f1b0008e8dd1930d6e89522c70f4a438374302a (patch) | |
tree | fb35404bdb4db79925891779e3be118eca8e85dd /fs/logfs/super.c | |
parent | ead88af5f577fd2b399a0fcdfe52605116fac489 (diff) |
[LogFS] Prevent mempool_destroy NULL pointer dereference
It would probably be better to just accept NULL pointers in
mempool_destroy(). But for the current -rc series let's keep things
simple.
This patch was lost in the cracks for a while.
Kevin Cernekee <cernekee@gmail.com> had to rediscover the problem and
send a similar patch because of it. :(
Signed-off-by: Joern Engel <joern@logfs.org>
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 d6e1f4fc3115..d4531eb46d0a 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c | |||
@@ -517,8 +517,8 @@ static void logfs_kill_sb(struct super_block *sb) | |||
517 | if (super->s_erase_page) | 517 | if (super->s_erase_page) |
518 | __free_page(super->s_erase_page); | 518 | __free_page(super->s_erase_page); |
519 | super->s_devops->put_device(sb); | 519 | super->s_devops->put_device(sb); |
520 | mempool_destroy(super->s_btree_pool); | 520 | logfs_mempool_destroy(super->s_btree_pool); |
521 | mempool_destroy(super->s_alias_pool); | 521 | logfs_mempool_destroy(super->s_alias_pool); |
522 | kfree(super); | 522 | kfree(super); |
523 | log_super("LogFS: Finished unmounting\n"); | 523 | log_super("LogFS: Finished unmounting\n"); |
524 | } | 524 | } |