Skip to content

Commit ce61856

Browse files
committed
dnotify: do not bother to lock entry->lock when reading mask
entry->lock is needed to make sure entry->mask does not change while manipulating it. In dnotify_should_send_event() we don't care if we get an old or a new mask value out of this entry so there is no point it taking the lock. Signed-off-by: Eric Paris <eparis@redhat.com>
1 parent 5ac697b commit ce61856

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/notify/dnotify/dnotify.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
153153
if (!entry)
154154
return false;
155155

156-
spin_lock(&entry->lock);
157156
send = (mask & entry->mask);
158-
spin_unlock(&entry->lock);
157+
159158
fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */
160159

161160
return send;

0 commit comments

Comments
 (0)