projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[deliverable/linux.git]
/
kernel
/
audit_tree.c
diff --git
a/kernel/audit_tree.c
b/kernel/audit_tree.c
index e3d63b596ef0b14bb50f421205e157c58598898a..7f18d3a4527ea210b253eddca60c8d8ed25a5e0a 100644
(file)
--- a/
kernel/audit_tree.c
+++ b/
kernel/audit_tree.c
@@
-22,7
+22,7
@@
struct audit_tree {
struct audit_chunk {
struct list_head hash;
struct audit_chunk {
struct list_head hash;
- struct fsnotify_mark
_entry
mark;
+ struct fsnotify_mark mark;
struct list_head trees; /* with root here */
int dead;
int count;
struct list_head trees; /* with root here */
int dead;
int count;
@@
-134,7
+134,7
@@
static void __put_chunk(struct rcu_head *rcu)
audit_put_chunk(chunk);
}
audit_put_chunk(chunk);
}
-static void audit_tree_destroy_watch(struct fsnotify_mark
_entry
*entry)
+static void audit_tree_destroy_watch(struct fsnotify_mark *entry)
{
struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark);
call_rcu(&chunk->head, __put_chunk);
{
struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark);
call_rcu(&chunk->head, __put_chunk);
@@
-176,12
+176,12
@@
static inline struct list_head *chunk_hash(const struct inode *inode)
/* hash_lock & entry->lock is held by caller */
static void insert_hash(struct audit_chunk *chunk)
{
/* hash_lock & entry->lock is held by caller */
static void insert_hash(struct audit_chunk *chunk)
{
- struct fsnotify_mark
_entry
*entry = &chunk->mark;
+ struct fsnotify_mark *entry = &chunk->mark;
struct list_head *list;
struct list_head *list;
- if (!entry->inode)
+ if (!entry->i
.i
node)
return;
return;
- list = chunk_hash(entry->inode);
+ list = chunk_hash(entry->i
.i
node);
list_add_rcu(&chunk->hash, list);
}
list_add_rcu(&chunk->hash, list);
}
@@
-193,7
+193,7
@@
struct audit_chunk *audit_tree_lookup(const struct inode *inode)
list_for_each_entry_rcu(p, list, hash) {
/* mark.inode may have gone NULL, but who cares? */
list_for_each_entry_rcu(p, list, hash) {
/* mark.inode may have gone NULL, but who cares? */
- if (p->mark.inode == inode) {
+ if (p->mark.i
.i
node == inode) {
atomic_long_inc(&p->refs);
return p;
}
atomic_long_inc(&p->refs);
return p;
}
@@
-222,7
+222,7
@@
static struct audit_chunk *find_chunk(struct node *p)
static void untag_chunk(struct node *p)
{
struct audit_chunk *chunk = find_chunk(p);
static void untag_chunk(struct node *p)
{
struct audit_chunk *chunk = find_chunk(p);
- struct fsnotify_mark
_entry
*entry = &chunk->mark;
+ struct fsnotify_mark *entry = &chunk->mark;
struct audit_chunk *new;
struct audit_tree *owner;
int size = chunk->count - 1;
struct audit_chunk *new;
struct audit_tree *owner;
int size = chunk->count - 1;
@@
-233,7
+233,7
@@
static void untag_chunk(struct node *p)
spin_unlock(&hash_lock);
spin_lock(&entry->lock);
spin_unlock(&hash_lock);
spin_lock(&entry->lock);
- if (chunk->dead || !entry->inode) {
+ if (chunk->dead || !entry->i
.i
node) {
spin_unlock(&entry->lock);
goto out;
}
spin_unlock(&entry->lock);
goto out;
}
@@
-250,7
+250,7
@@
static void untag_chunk(struct node *p)
list_del_rcu(&chunk->hash);
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
list_del_rcu(&chunk->hash);
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
- fsnotify_destroy_mark
_by_entry
(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
goto out;
}
fsnotify_put_mark(entry);
goto out;
}
@@
-259,7
+259,7
@@
static void untag_chunk(struct node *p)
if (!new)
goto Fallback;
fsnotify_duplicate_mark(&new->mark, entry);
if (!new)
goto Fallback;
fsnotify_duplicate_mark(&new->mark, entry);
- if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.i
node
, 1)) {
+ if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.i
.inode, NULL
, 1)) {
free_chunk(new);
goto Fallback;
}
free_chunk(new);
goto Fallback;
}
@@
-293,7
+293,7
@@
static void untag_chunk(struct node *p)
owner->root = new;
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
owner->root = new;
spin_unlock(&hash_lock);
spin_unlock(&entry->lock);
- fsnotify_destroy_mark
_by_entry
(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
goto out;
fsnotify_put_mark(entry);
goto out;
@@
-316,13
+316,13
@@
out:
static int create_chunk(struct inode *inode, struct audit_tree *tree)
{
static int create_chunk(struct inode *inode, struct audit_tree *tree)
{
- struct fsnotify_mark
_entry
*entry;
+ struct fsnotify_mark *entry;
struct audit_chunk *chunk = alloc_chunk(1);
if (!chunk)
return -ENOMEM;
entry = &chunk->mark;
struct audit_chunk *chunk = alloc_chunk(1);
if (!chunk)
return -ENOMEM;
entry = &chunk->mark;
- if (fsnotify_add_mark(entry, audit_tree_group, inode, 0)) {
+ if (fsnotify_add_mark(entry, audit_tree_group, inode,
NULL,
0)) {
free_chunk(chunk);
return -ENOSPC;
}
free_chunk(chunk);
return -ENOSPC;
}
@@
-333,7
+333,7
@@
static int create_chunk(struct inode *inode, struct audit_tree *tree)
spin_unlock(&hash_lock);
chunk->dead = 1;
spin_unlock(&entry->lock);
spin_unlock(&hash_lock);
chunk->dead = 1;
spin_unlock(&entry->lock);
- fsnotify_destroy_mark
_by_entry
(entry);
+ fsnotify_destroy_mark(entry);
fsnotify_put_mark(entry);
return 0;
}
fsnotify_put_mark(entry);
return 0;
}
@@
-354,15
+354,13
@@
static int create_chunk(struct inode *inode, struct audit_tree *tree)
/* the first tagged inode becomes root of tree */
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
{
/* the first tagged inode becomes root of tree */
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
{
- struct fsnotify_mark
_entry
*old_entry, *chunk_entry;
+ struct fsnotify_mark *old_entry, *chunk_entry;
struct audit_tree *owner;
struct audit_chunk *chunk, *old;
struct node *p;
int n;
struct audit_tree *owner;
struct audit_chunk *chunk, *old;
struct node *p;
int n;
- spin_lock(&inode->i_lock);
- old_entry = fsnotify_find_mark_entry(audit_tree_group, inode);
- spin_unlock(&inode->i_lock);
+ old_entry = fsnotify_find_inode_mark(audit_tree_group, inode);
if (!old_entry)
return create_chunk(inode, tree);
if (!old_entry)
return create_chunk(inode, tree);
@@
-388,7
+386,7
@@
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
chunk_entry = &chunk->mark;
spin_lock(&old_entry->lock);
chunk_entry = &chunk->mark;
spin_lock(&old_entry->lock);
- if (!old_entry->inode) {
+ if (!old_entry->i
.i
node) {
/* old_entry is being shot, lets just lie */
spin_unlock(&old_entry->lock);
fsnotify_put_mark(old_entry);
/* old_entry is being shot, lets just lie */
spin_unlock(&old_entry->lock);
fsnotify_put_mark(old_entry);
@@
-397,7
+395,7
@@
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
}
fsnotify_duplicate_mark(chunk_entry, old_entry);
}
fsnotify_duplicate_mark(chunk_entry, old_entry);
- if (fsnotify_add_mark(chunk_entry, chunk_entry->group, chunk_entry->i
node
, 1)) {
+ if (fsnotify_add_mark(chunk_entry, chunk_entry->group, chunk_entry->i
.inode, NULL
, 1)) {
spin_unlock(&old_entry->lock);
free_chunk(chunk);
fsnotify_put_mark(old_entry);
spin_unlock(&old_entry->lock);
free_chunk(chunk);
fsnotify_put_mark(old_entry);
@@
-415,7
+413,7
@@
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
- fsnotify_destroy_mark
_by_entry
(chunk_entry);
+ fsnotify_destroy_mark(chunk_entry);
fsnotify_put_mark(chunk_entry);
fsnotify_put_mark(old_entry);
fsnotify_put_mark(chunk_entry);
fsnotify_put_mark(old_entry);
@@
-446,7
+444,7
@@
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
spin_unlock(&hash_lock);
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
spin_unlock(&hash_lock);
spin_unlock(&chunk_entry->lock);
spin_unlock(&old_entry->lock);
- fsnotify_destroy_mark
_by_entry
(old_entry);
+ fsnotify_destroy_mark(old_entry);
fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */
fsnotify_put_mark(old_entry); /* and kill it */
return 0;
fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */
fsnotify_put_mark(old_entry); /* and kill it */
return 0;
@@
-605,7
+603,7
@@
void audit_trim_trees(void)
list_for_each_entry(node, &tree->chunks, list) {
struct audit_chunk *chunk = find_chunk(node);
/* this could be NULL if the watch is dieing else where... */
list_for_each_entry(node, &tree->chunks, list) {
struct audit_chunk *chunk = find_chunk(node);
/* this could be NULL if the watch is dieing else where... */
- struct inode *inode = chunk->mark.inode;
+ struct inode *inode = chunk->mark.i
.i
node;
node->index |= 1U<<31;
if (iterate_mounts(compare_root, inode, root_mnt))
node->index &= ~(1U<<31);
node->index |= 1U<<31;
if (iterate_mounts(compare_root, inode, root_mnt))
node->index &= ~(1U<<31);
@@
-905,13
+903,16
@@
static void evict_chunk(struct audit_chunk *chunk)
mutex_unlock(&audit_filter_mutex);
}
mutex_unlock(&audit_filter_mutex);
}
-static int audit_tree_handle_event(struct fsnotify_group *group, struct fsnotify_event *event)
+static int audit_tree_handle_event(struct fsnotify_group *group,
+ struct fsnotify_mark *inode_mark,
+ struct fsnotify_mark *vfsmonut_mark,
+ struct fsnotify_event *event)
{
BUG();
return -EOPNOTSUPP;
}
{
BUG();
return -EOPNOTSUPP;
}
-static void audit_tree_freeing_mark(struct fsnotify_mark
_entry
*entry, struct fsnotify_group *group)
+static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify_group *group)
{
struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark);
{
struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark);
@@
-920,9
+921,11
@@
static void audit_tree_freeing_mark(struct fsnotify_mark_entry *entry, struct fs
}
static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode,
}
static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode,
+ struct fsnotify_mark *inode_mark,
+ struct fsnotify_mark *vfsmount_mark,
__u32 mask, void *data, int data_type)
{
__u32 mask, void *data, int data_type)
{
- return
0
;
+ return
false
;
}
static const struct fsnotify_ops audit_tree_ops = {
}
static const struct fsnotify_ops audit_tree_ops = {
@@
-937,8
+940,7
@@
static int __init audit_tree_init(void)
{
int i;
{
int i;
- audit_tree_group = fsnotify_obtain_group(AUDIT_TREE_GROUP_NUM,
- 0, &audit_tree_ops);
+ audit_tree_group = fsnotify_alloc_group(&audit_tree_ops);
if (IS_ERR(audit_tree_group))
audit_panic("cannot initialize fsnotify group for rectree watches");
if (IS_ERR(audit_tree_group))
audit_panic("cannot initialize fsnotify group for rectree watches");
This page took
0.040342 seconds
and
5
git commands to generate.