From: Fabian Frederick Date: Tue, 12 May 2020 18:18:03 +0000 (+0200) Subject: fsnotify: add mutex destroy X-Git-Tag: v5.8-rc1~147^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=191e1656d18c47d8815f6618431a387d99944884;p=thirdparty%2Fkernel%2Flinux.git fsnotify: add mutex destroy Call mutex_destroy() before freeing notification group. This only adds some additional debug checks when mutex debugging is enabled but still it may be useful. Link: https://lore.kernel.org/r/20200512181803.405832-1-fabf@skynet.be Signed-off-by: Fabian Frederick Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara --- diff --git a/fs/notify/group.c b/fs/notify/group.c index 133f723aca070..a4a4b1c64d32a 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -25,6 +25,7 @@ static void fsnotify_final_destroy_group(struct fsnotify_group *group) group->ops->free_group_priv(group); mem_cgroup_put(group->memcg); + mutex_destroy(&group->mark_mutex); kfree(group); }