Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d5ffebdd
Commit
d5ffebdd
authored
Jan 05, 2018
by
Mike Snitzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dm: backfill missing calls to mutex_destroy()
Signed-off-by:
Mike Snitzer
<
snitzer@redhat.com
>
parent
ae1093be
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
2 deletions
+27
-2
drivers/md/dm-crypt.c
drivers/md/dm-crypt.c
+2
-0
drivers/md/dm-delay.c
drivers/md/dm-delay.c
+2
-0
drivers/md/dm-kcopyd.c
drivers/md/dm-kcopyd.c
+4
-2
drivers/md/dm-mpath.c
drivers/md/dm-mpath.c
+1
-0
drivers/md/dm-stats.c
drivers/md/dm-stats.c
+1
-0
drivers/md/dm-thin.c
drivers/md/dm-thin.c
+7
-0
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-metadata.c
+3
-0
drivers/md/dm-zoned-target.c
drivers/md/dm-zoned-target.c
+3
-0
drivers/md/dm.c
drivers/md/dm.c
+4
-0
No files found.
drivers/md/dm-crypt.c
View file @
d5ffebdd
...
...
@@ -2192,6 +2192,8 @@ static void crypt_dtr(struct dm_target *ti)
kzfree
(
cc
->
cipher_auth
);
kzfree
(
cc
->
authenc_key
);
mutex_destroy
(
&
cc
->
bio_alloc_lock
);
/* Must zero key material before freeing */
kzfree
(
cc
);
}
...
...
drivers/md/dm-delay.c
View file @
d5ffebdd
...
...
@@ -229,6 +229,8 @@ static void delay_dtr(struct dm_target *ti)
if
(
dc
->
dev_write
)
dm_put_device
(
ti
,
dc
->
dev_write
);
mutex_destroy
(
&
dc
->
timer_lock
);
kfree
(
dc
);
}
...
...
drivers/md/dm-kcopyd.c
View file @
d5ffebdd
...
...
@@ -477,8 +477,10 @@ static int run_complete_job(struct kcopyd_job *job)
* If this is the master job, the sub jobs have already
* completed so we can free everything.
*/
if
(
job
->
master_job
==
job
)
if
(
job
->
master_job
==
job
)
{
mutex_destroy
(
&
job
->
lock
);
mempool_free
(
job
,
kc
->
job_pool
);
}
fn
(
read_err
,
write_err
,
context
);
if
(
atomic_dec_and_test
(
&
kc
->
nr_jobs
))
...
...
@@ -750,6 +752,7 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
* followed by SPLIT_COUNT sub jobs.
*/
job
=
mempool_alloc
(
kc
->
job_pool
,
GFP_NOIO
);
mutex_init
(
&
job
->
lock
);
/*
* set up for the read.
...
...
@@ -811,7 +814,6 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
if
(
job
->
source
.
count
<=
SUB_JOB_SIZE
)
dispatch_job
(
job
);
else
{
mutex_init
(
&
job
->
lock
);
job
->
progress
=
0
;
split_job
(
job
);
}
...
...
drivers/md/dm-mpath.c
View file @
d5ffebdd
...
...
@@ -248,6 +248,7 @@ static void free_multipath(struct multipath *m)
kfree
(
m
->
hw_handler_name
);
kfree
(
m
->
hw_handler_params
);
mutex_destroy
(
&
m
->
work_mutex
);
kfree
(
m
);
}
...
...
drivers/md/dm-stats.c
View file @
d5ffebdd
...
...
@@ -228,6 +228,7 @@ void dm_stats_cleanup(struct dm_stats *stats)
dm_stat_free
(
&
s
->
rcu_head
);
}
free_percpu
(
stats
->
last
);
mutex_destroy
(
&
stats
->
mutex
);
}
static
int
dm_stats_create
(
struct
dm_stats
*
stats
,
sector_t
start
,
sector_t
end
,
...
...
drivers/md/dm-thin.c
View file @
d5ffebdd
...
...
@@ -492,6 +492,11 @@ static void pool_table_init(void)
INIT_LIST_HEAD
(
&
dm_thin_pool_table
.
pools
);
}
static
void
pool_table_exit
(
void
)
{
mutex_destroy
(
&
dm_thin_pool_table
.
mutex
);
}
static
void
__pool_table_insert
(
struct
pool
*
pool
)
{
BUG_ON
(
!
mutex_is_locked
(
&
dm_thin_pool_table
.
mutex
));
...
...
@@ -4387,6 +4392,8 @@ static void dm_thin_exit(void)
dm_unregister_target
(
&
pool_target
);
kmem_cache_destroy
(
_new_mapping_cache
);
pool_table_exit
();
}
module_init
(
dm_thin_init
);
...
...
drivers/md/dm-zoned-metadata.c
View file @
d5ffebdd
...
...
@@ -2333,6 +2333,9 @@ static void dmz_cleanup_metadata(struct dmz_metadata *zmd)
/* Free the zone descriptors */
dmz_drop_zones
(
zmd
);
mutex_destroy
(
&
zmd
->
mblk_flush_lock
);
mutex_destroy
(
&
zmd
->
map_lock
);
}
/*
...
...
drivers/md/dm-zoned-target.c
View file @
d5ffebdd
...
...
@@ -827,6 +827,7 @@ static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv)
err_cwq:
destroy_workqueue
(
dmz
->
chunk_wq
);
err_bio:
mutex_destroy
(
&
dmz
->
chunk_lock
);
bioset_free
(
dmz
->
bio_set
);
err_meta:
dmz_dtr_metadata
(
dmz
->
metadata
);
...
...
@@ -861,6 +862,8 @@ static void dmz_dtr(struct dm_target *ti)
dmz_put_zoned_device
(
ti
);
mutex_destroy
(
&
dmz
->
chunk_lock
);
kfree
(
dmz
);
}
...
...
drivers/md/dm.c
View file @
d5ffebdd
...
...
@@ -1789,6 +1789,10 @@ static void cleanup_mapped_device(struct mapped_device *md)
md
->
bdev
=
NULL
;
}
mutex_destroy
(
&
md
->
suspend_lock
);
mutex_destroy
(
&
md
->
type_lock
);
mutex_destroy
(
&
md
->
table_devices_lock
);
dm_mq_cleanup_mapped_device
(
md
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment