Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26854
b: refs/heads/master
c: 66055a4
h: refs/heads/master
v: v3
  • Loading branch information
Amy Griffis authored and Linus Torvalds committed May 21, 2006
1 parent 77b07f2 commit 32543cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12783b002db1f02c29353c8f698a85514420b9f4
refs/heads/master: 66055a4e7334b05354c835123ff621c5f700e56a
6 changes: 5 additions & 1 deletion trunk/fs/inotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,11 @@ static int inotify_release(struct inode *ignored, struct file *file)
inode = watch->inode;
mutex_lock(&inode->inotify_mutex);
mutex_lock(&dev->mutex);
remove_watch_no_event(watch, dev);

/* make sure we didn't race with another list removal */
if (likely(idr_find(&dev->idr, watch->wd)))
remove_watch_no_event(watch, dev);

mutex_unlock(&dev->mutex);
mutex_unlock(&inode->inotify_mutex);
put_inotify_watch(watch);
Expand Down

0 comments on commit 32543cb

Please sign in to comment.