Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284997
b: refs/heads/master
c: fed4748
h: refs/heads/master
i:
  284995: 1126a14
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jan 15, 2012
1 parent b6b54f6 commit b185376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 1e6c4dfdeb040b2dd5c4d6d803ab95c3971ad80c
refs/heads/master: fed474857efbed79cd390d0aee224231ca718f63
8 changes: 5 additions & 3 deletions trunk/fs/notify/mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)

mark->flags &= ~FSNOTIFY_MARK_FLAG_ALIVE;

/* 1 from caller and 1 for being on i_list/g_list */
BUG_ON(atomic_read(&mark->refcnt) < 2);

spin_lock(&group->mark_lock);

if (mark->flags & FSNOTIFY_MARK_FLAG_INODE) {
Expand Down Expand Up @@ -181,6 +178,11 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
if (inode && (mark->flags & FSNOTIFY_MARK_FLAG_OBJECT_PINNED))
iput(inode);

/*
* We don't necessarily have a ref on mark from caller so the above iput
* may have already destroyed it. Don't touch from now on.
*/

/*
* it's possible that this group tried to destroy itself, but this
* this mark was simultaneously being freed by inode. If that's the
Expand Down

0 comments on commit b185376

Please sign in to comment.