diff options
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index f3035691f528..f31e90fc050d 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -63,8 +63,8 @@ void fsnotify_destroy_inode_mark(struct fsnotify_mark *mark) | |||
63 | { | 63 | { |
64 | struct inode *inode = mark->i.inode; | 64 | struct inode *inode = mark->i.inode; |
65 | 65 | ||
66 | BUG_ON(!mutex_is_locked(&mark->group->mark_mutex)); | ||
66 | assert_spin_locked(&mark->lock); | 67 | assert_spin_locked(&mark->lock); |
67 | assert_spin_locked(&mark->group->mark_lock); | ||
68 | 68 | ||
69 | spin_lock(&inode->i_lock); | 69 | spin_lock(&inode->i_lock); |
70 | 70 | ||
@@ -99,8 +99,16 @@ void fsnotify_clear_marks_by_inode(struct inode *inode) | |||
99 | spin_unlock(&inode->i_lock); | 99 | spin_unlock(&inode->i_lock); |
100 | 100 | ||
101 | list_for_each_entry_safe(mark, lmark, &free_list, i.free_i_list) { | 101 | list_for_each_entry_safe(mark, lmark, &free_list, i.free_i_list) { |
102 | fsnotify_destroy_mark(mark); | 102 | struct fsnotify_group *group; |
103 | |||
104 | spin_lock(&mark->lock); | ||
105 | fsnotify_get_group(mark->group); | ||
106 | group = mark->group; | ||
107 | spin_unlock(&mark->lock); | ||
108 | |||
109 | fsnotify_destroy_mark(mark, group); | ||
103 | fsnotify_put_mark(mark); | 110 | fsnotify_put_mark(mark); |
111 | fsnotify_put_group(group); | ||
104 | } | 112 | } |
105 | } | 113 | } |
106 | 114 | ||
@@ -192,8 +200,8 @@ int fsnotify_add_inode_mark(struct fsnotify_mark *mark, | |||
192 | 200 | ||
193 | mark->flags |= FSNOTIFY_MARK_FLAG_INODE; | 201 | mark->flags |= FSNOTIFY_MARK_FLAG_INODE; |
194 | 202 | ||
203 | BUG_ON(!mutex_is_locked(&group->mark_mutex)); | ||
195 | assert_spin_locked(&mark->lock); | 204 | assert_spin_locked(&mark->lock); |
196 | assert_spin_locked(&group->mark_lock); | ||
197 | 205 | ||
198 | spin_lock(&inode->i_lock); | 206 | spin_lock(&inode->i_lock); |
199 | 207 | ||