diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2009-12-17 21:24:25 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:54 -0400 |
commit | 35566087099c3ff8901d65ee98af56347ee66e5a (patch) | |
tree | e4e56bcf787e5f100fa1ea0138c417e1203b10ae /kernel/audit_watch.c | |
parent | ef5e2b785fb3216269e6d0656d38ec286b98dbe5 (diff) |
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/audit_watch.c')
-rw-r--r-- | kernel/audit_watch.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 24ecbebf4354..d85fa538a722 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) | |||
101 | struct audit_parent *parent = NULL; | 101 | struct audit_parent *parent = NULL; |
102 | struct fsnotify_mark *entry; | 102 | struct fsnotify_mark *entry; |
103 | 103 | ||
104 | spin_lock(&inode->i_lock); | ||
105 | entry = fsnotify_find_mark(audit_watch_group, inode); | 104 | entry = fsnotify_find_mark(audit_watch_group, inode); |
106 | spin_unlock(&inode->i_lock); | ||
107 | |||
108 | if (entry) | 105 | if (entry) |
109 | parent = container_of(entry, struct audit_parent, mark); | 106 | parent = container_of(entry, struct audit_parent, mark); |
110 | 107 | ||
@@ -520,9 +517,7 @@ static bool audit_watch_should_send_event(struct fsnotify_group *group, struct i | |||
520 | struct fsnotify_mark *entry; | 517 | struct fsnotify_mark *entry; |
521 | bool send; | 518 | bool send; |
522 | 519 | ||
523 | spin_lock(&inode->i_lock); | ||
524 | entry = fsnotify_find_mark(group, inode); | 520 | entry = fsnotify_find_mark(group, inode); |
525 | spin_unlock(&inode->i_lock); | ||
526 | if (!entry) | 521 | if (!entry) |
527 | return false; | 522 | return false; |
528 | 523 | ||