diff options
author | Joern Engel <joern@logfs.org> | 2010-04-15 08:03:57 +0200 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2010-04-15 08:03:57 +0200 |
commit | 1f1b0008e8dd1930d6e89522c70f4a438374302a (patch) | |
tree | fb35404bdb4db79925891779e3be118eca8e85dd /fs/logfs/readwrite.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/readwrite.c')
-rw-r--r-- | fs/logfs/readwrite.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 7e0c39c4971..aca6c56a107 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c @@ -2243,8 +2243,6 @@ void logfs_cleanup_rw(struct super_block *sb) struct logfs_super *super = logfs_super(sb); destroy_meta_inode(super->s_segfile_inode); - if (super->s_block_pool) - mempool_destroy(super->s_block_pool); - if (super->s_shadow_pool) - mempool_destroy(super->s_shadow_pool); + logfs_mempool_destroy(super->s_block_pool); + logfs_mempool_destroy(super->s_shadow_pool); } |