diff options
author | Aliaksei Karaliou <akaraliou.dev@gmail.com> | 2017-12-23 13:27:03 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-01-17 09:16:02 -0500 |
commit | bde14184781bd24ee6fb0e1af8d69ca21acbd6e6 (patch) | |
tree | 7e27ec63fc577e4efbbdbe13efbf9eb19294db20 /drivers/md | |
parent | 905be0a121d931132e081784930fc7d7c8d58071 (diff) | |
download | lwn-bde14184781bd24ee6fb0e1af8d69ca21acbd6e6.tar.gz lwn-bde14184781bd24ee6fb0e1af8d69ca21acbd6e6.zip |
dm bufio: add missed destroys of client mutex
The client's mutex needs to be destroyed in dm_bufio_client_destroy() as
well as the dm_bufio_client_create() error path.
Signed-off-by: Aliaksei Karaliou <akaraliou.dev@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-bufio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 951a6356fbec..1d130130f264 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1767,6 +1767,7 @@ bad_cache: } dm_io_client_destroy(c->dm_io); bad_dm_io: + mutex_destroy(&c->lock); kfree(c); bad_client: return ERR_PTR(r); @@ -1811,6 +1812,7 @@ void dm_bufio_client_destroy(struct dm_bufio_client *c) BUG_ON(c->n_buffers[i]); dm_io_client_destroy(c->dm_io); + mutex_destroy(&c->lock); kfree(c); } EXPORT_SYMBOL_GPL(dm_bufio_client_destroy); |