aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2009-12-17 21:24:25 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:54 -0400
commit35566087099c3ff8901d65ee98af56347ee66e5a (patch)
treee4e56bcf787e5f100fa1ea0138c417e1203b10ae /kernel
parentef5e2b785fb3216269e6d0656d38ec286b98dbe5 (diff)
downloadkernel_samsung_aries-35566087099c3ff8901d65ee98af56347ee66e5a.zip
kernel_samsung_aries-35566087099c3ff8901d65ee98af56347ee66e5a.tar.gz
kernel_samsung_aries-35566087099c3ff8901d65ee98af56347ee66e5a.tar.bz2
fsnotify: take inode->i_lock inside fsnotify_find_mark_entry()
All callers to fsnotify_find_mark_entry() except one take and release inode->i_lock around the call. Take the lock inside fsnotify_find_mark_entry() instead. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_tree.c2
-rw-r--r--kernel/audit_watch.c5
2 files changed, 0 insertions, 7 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index b20fb05..80f8ac3 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -360,9 +360,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
struct node *p;
int n;
- spin_lock(&inode->i_lock);
old_entry = fsnotify_find_mark(audit_tree_group, inode);
- spin_unlock(&inode->i_lock);
if (!old_entry)
return create_chunk(inode, tree);
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 24ecbeb..d85fa53 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -101,10 +101,7 @@ static inline struct audit_parent *audit_find_parent(struct inode *inode)
struct audit_parent *parent = NULL;
struct fsnotify_mark *entry;
- spin_lock(&inode->i_lock);
entry = fsnotify_find_mark(audit_watch_group, inode);
- spin_unlock(&inode->i_lock);
-
if (entry)
parent = container_of(entry, struct audit_parent, mark);
@@ -520,9 +517,7 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i
struct fsnotify_mark *entry;
bool send;
- spin_lock(&inode->i_lock);
entry = fsnotify_find_mark(group, inode);
- spin_unlock(&inode->i_lock);
if (!entry)
return false;