Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177995
b: refs/heads/master
c: b4c30aa
h: refs/heads/master
i:
  177993: 4011817
  177991: 06e41c5
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Dec 19, 2009
1 parent bcab30c commit 902138f
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 6f5d51148921c242680a7a1d9913384a30ab3cbe
refs/heads/master: b4c30aad39805902cf5b855aa8a8b22d728ad057
9 changes: 6 additions & 3 deletions trunk/kernel/audit_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,17 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
for (n = 0; n < old->count; n++) {
if (old->owners[n].owner == tree) {
spin_unlock(&hash_lock);
put_inotify_watch(watch);
put_inotify_watch(&old->watch);
return 0;
}
}
spin_unlock(&hash_lock);

chunk = alloc_chunk(old->count + 1);
if (!chunk)
if (!chunk) {
put_inotify_watch(&old->watch);
return -ENOMEM;
}

mutex_lock(&inode->inotify_mutex);
if (inotify_clone_watch(&old->watch, &chunk->watch) < 0) {
Expand Down Expand Up @@ -425,7 +427,8 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
spin_unlock(&hash_lock);
inotify_evict_watch(&old->watch);
mutex_unlock(&inode->inotify_mutex);
put_inotify_watch(&old->watch);
put_inotify_watch(&old->watch); /* pair to inotify_find_watch */
put_inotify_watch(&old->watch); /* and kill it */
return 0;
}

Expand Down

0 comments on commit 902138f

Please sign in to comment.