Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608988

[PATCH 1/5] notify: Call mutex_destroy() before freeing mutex memory

From Jes Sorensen <jes.sorensen@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] notify: Call mutex_destroy() before freeing mutex memory
Date 2017-03-24 22:40 +0100
Message-ID <toF69-7By-7@gated-at.bofh.it> (permalink)
References <toF69-7By-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The conversion of notify from using a spinlock to a mutex missed
adding the call mutex_destroy().

Fixes: 986ab09 ("fsnotify: use a mutex instead of a spinlock to protect a groups mark list")
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
---
 fs/notify/group.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/notify/group.c b/fs/notify/group.c
index fbe3cbe..d231be3 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -36,6 +36,7 @@ static void fsnotify_final_destroy_group(struct fsnotify_group *group)
 	if (group->ops->free_group_priv)
 		group->ops->free_group_priv(group);
 
+	mutex_destroy(&group->mark_mutex);
 	kfree(group);
 }
 
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] inofify: Reduce lock contention on read() Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100
  [PATCH 5/5] inotify: Avoid taking spinlock for each event processed in read() Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100
  [PATCH 1/5] notify: Call mutex_destroy() before freeing mutex memory Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100
  [PATCH 2/5] inotify: Use mutex to prevent threaded clients reading events out of order Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100
  [PATCH 4/5] inotify: switch get_one_event() to use fsnotify_list_*() helpers Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100
  [PATCH 3/5] notify: Split up some fsnotify functions Jes Sorensen <jes.sorensen@gmail.com> - 2017-03-24 22:40 +0100

csiph-web