diff options
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r-- | kernel/audit_tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 8ad9545b8db9..6e7351739a82 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -385,6 +385,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
385 | mutex_lock(&inode->inotify_mutex); | 385 | mutex_lock(&inode->inotify_mutex); |
386 | if (inotify_clone_watch(&old->watch, &chunk->watch) < 0) { | 386 | if (inotify_clone_watch(&old->watch, &chunk->watch) < 0) { |
387 | mutex_unlock(&inode->inotify_mutex); | 387 | mutex_unlock(&inode->inotify_mutex); |
388 | put_inotify_watch(&old->watch); | ||
388 | free_chunk(chunk); | 389 | free_chunk(chunk); |
389 | return -ENOSPC; | 390 | return -ENOSPC; |
390 | } | 391 | } |
@@ -394,6 +395,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
394 | chunk->dead = 1; | 395 | chunk->dead = 1; |
395 | inotify_evict_watch(&chunk->watch); | 396 | inotify_evict_watch(&chunk->watch); |
396 | mutex_unlock(&inode->inotify_mutex); | 397 | mutex_unlock(&inode->inotify_mutex); |
398 | put_inotify_watch(&old->watch); | ||
397 | put_inotify_watch(&chunk->watch); | 399 | put_inotify_watch(&chunk->watch); |
398 | return 0; | 400 | return 0; |
399 | } | 401 | } |
@@ -732,9 +734,6 @@ int audit_tag_tree(char *old, char *new) | |||
732 | dentry = dget(path.dentry); | 734 | dentry = dget(path.dentry); |
733 | path_put(&path); | 735 | path_put(&path); |
734 | 736 | ||
735 | if (dentry == tagged->mnt_root && dentry == mnt->mnt_root) | ||
736 | follow_up(&mnt, &dentry); | ||
737 | |||
738 | list_add_tail(&list, &tagged->mnt_list); | 737 | list_add_tail(&list, &tagged->mnt_list); |
739 | 738 | ||
740 | mutex_lock(&audit_filter_mutex); | 739 | mutex_lock(&audit_filter_mutex); |