diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:55 -0400 |
commit | 3b362157b2162719145d4f3d4f534357d89b45ce (patch) | |
tree | 20b1a73d33e66ce138253f19fec744b619fcb0ce | |
parent | c1d81b1cf937027d23f7e53cdd12328799028c6a (diff) |
VFS: audit: d_backing_inode() annotations
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | kernel/audit.c | 2 | ||||
-rw-r--r-- | kernel/audit_tree.c | 4 | ||||
-rw-r--r-- | kernel/audit_watch.c | 14 | ||||
-rw-r--r-- | kernel/auditsc.c | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 72ab759a0b43..f0603092f5cc 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -1915,7 +1915,7 @@ void audit_log_link_denied(const char *operation, struct path *link) | |||
1915 | 1915 | ||
1916 | /* Generate AUDIT_PATH record with object. */ | 1916 | /* Generate AUDIT_PATH record with object. */ |
1917 | name->type = AUDIT_TYPE_NORMAL; | 1917 | name->type = AUDIT_TYPE_NORMAL; |
1918 | audit_copy_inode(name, link->dentry, link->dentry->d_inode); | 1918 | audit_copy_inode(name, link->dentry, d_backing_inode(link->dentry)); |
1919 | audit_log_name(current->audit_context, name, link, 0, NULL); | 1919 | audit_log_name(current->audit_context, name, link, 0, NULL); |
1920 | out: | 1920 | out: |
1921 | kfree(name); | 1921 | kfree(name); |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 2e0c97427b33..70bd2532437b 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -576,7 +576,7 @@ int audit_remove_tree_rule(struct audit_krule *rule) | |||
576 | 576 | ||
577 | static int compare_root(struct vfsmount *mnt, void *arg) | 577 | static int compare_root(struct vfsmount *mnt, void *arg) |
578 | { | 578 | { |
579 | return mnt->mnt_root->d_inode == arg; | 579 | return d_backing_inode(mnt->mnt_root) == arg; |
580 | } | 580 | } |
581 | 581 | ||
582 | void audit_trim_trees(void) | 582 | void audit_trim_trees(void) |
@@ -648,7 +648,7 @@ void audit_put_tree(struct audit_tree *tree) | |||
648 | 648 | ||
649 | static int tag_mount(struct vfsmount *mnt, void *arg) | 649 | static int tag_mount(struct vfsmount *mnt, void *arg) |
650 | { | 650 | { |
651 | return tag_chunk(mnt->mnt_root->d_inode, arg); | 651 | return tag_chunk(d_backing_inode(mnt->mnt_root), arg); |
652 | } | 652 | } |
653 | 653 | ||
654 | /* called with audit_filter_mutex */ | 654 | /* called with audit_filter_mutex */ |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index ad9c1682f616..6e30024d9aac 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -146,7 +146,7 @@ int audit_watch_compare(struct audit_watch *watch, unsigned long ino, dev_t dev) | |||
146 | /* Initialize a parent watch entry. */ | 146 | /* Initialize a parent watch entry. */ |
147 | static struct audit_parent *audit_init_parent(struct path *path) | 147 | static struct audit_parent *audit_init_parent(struct path *path) |
148 | { | 148 | { |
149 | struct inode *inode = path->dentry->d_inode; | 149 | struct inode *inode = d_backing_inode(path->dentry); |
150 | struct audit_parent *parent; | 150 | struct audit_parent *parent; |
151 | int ret; | 151 | int ret; |
152 | 152 | ||
@@ -361,11 +361,11 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent) | |||
361 | struct dentry *d = kern_path_locked(watch->path, parent); | 361 | struct dentry *d = kern_path_locked(watch->path, parent); |
362 | if (IS_ERR(d)) | 362 | if (IS_ERR(d)) |
363 | return PTR_ERR(d); | 363 | return PTR_ERR(d); |
364 | mutex_unlock(&parent->dentry->d_inode->i_mutex); | 364 | mutex_unlock(&d_backing_inode(parent->dentry)->i_mutex); |
365 | if (d->d_inode) { | 365 | if (d_is_positive(d)) { |
366 | /* update watch filter fields */ | 366 | /* update watch filter fields */ |
367 | watch->dev = d->d_inode->i_sb->s_dev; | 367 | watch->dev = d_backing_inode(d)->i_sb->s_dev; |
368 | watch->ino = d->d_inode->i_ino; | 368 | watch->ino = d_backing_inode(d)->i_ino; |
369 | } | 369 | } |
370 | dput(d); | 370 | dput(d); |
371 | return 0; | 371 | return 0; |
@@ -426,7 +426,7 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list) | |||
426 | return ret; | 426 | return ret; |
427 | 427 | ||
428 | /* either find an old parent or attach a new one */ | 428 | /* either find an old parent or attach a new one */ |
429 | parent = audit_find_parent(parent_path.dentry->d_inode); | 429 | parent = audit_find_parent(d_backing_inode(parent_path.dentry)); |
430 | if (!parent) { | 430 | if (!parent) { |
431 | parent = audit_init_parent(&parent_path); | 431 | parent = audit_init_parent(&parent_path); |
432 | if (IS_ERR(parent)) { | 432 | if (IS_ERR(parent)) { |
@@ -482,7 +482,7 @@ static int audit_watch_handle_event(struct fsnotify_group *group, | |||
482 | 482 | ||
483 | switch (data_type) { | 483 | switch (data_type) { |
484 | case (FSNOTIFY_EVENT_PATH): | 484 | case (FSNOTIFY_EVENT_PATH): |
485 | inode = ((struct path *)data)->dentry->d_inode; | 485 | inode = d_backing_inode(((struct path *)data)->dentry); |
486 | break; | 486 | break; |
487 | case (FSNOTIFY_EVENT_INODE): | 487 | case (FSNOTIFY_EVENT_INODE): |
488 | inode = (struct inode *)data; | 488 | inode = (struct inode *)data; |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index dc4ae70a7413..9edcf813318c 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1629,7 +1629,7 @@ retry: | |||
1629 | rcu_read_lock(); | 1629 | rcu_read_lock(); |
1630 | seq = read_seqbegin(&rename_lock); | 1630 | seq = read_seqbegin(&rename_lock); |
1631 | for(;;) { | 1631 | for(;;) { |
1632 | struct inode *inode = d->d_inode; | 1632 | struct inode *inode = d_backing_inode(d); |
1633 | if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) { | 1633 | if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) { |
1634 | struct audit_chunk *chunk; | 1634 | struct audit_chunk *chunk; |
1635 | chunk = audit_tree_lookup(inode); | 1635 | chunk = audit_tree_lookup(inode); |
@@ -1754,7 +1754,7 @@ void __audit_inode(struct filename *name, const struct dentry *dentry, | |||
1754 | unsigned int flags) | 1754 | unsigned int flags) |
1755 | { | 1755 | { |
1756 | struct audit_context *context = current->audit_context; | 1756 | struct audit_context *context = current->audit_context; |
1757 | const struct inode *inode = dentry->d_inode; | 1757 | const struct inode *inode = d_backing_inode(dentry); |
1758 | struct audit_names *n; | 1758 | struct audit_names *n; |
1759 | bool parent = flags & AUDIT_INODE_PARENT; | 1759 | bool parent = flags & AUDIT_INODE_PARENT; |
1760 | 1760 | ||
@@ -1853,7 +1853,7 @@ void __audit_inode_child(const struct inode *parent, | |||
1853 | const unsigned char type) | 1853 | const unsigned char type) |
1854 | { | 1854 | { |
1855 | struct audit_context *context = current->audit_context; | 1855 | struct audit_context *context = current->audit_context; |
1856 | const struct inode *inode = dentry->d_inode; | 1856 | const struct inode *inode = d_backing_inode(dentry); |
1857 | const char *dname = dentry->d_name.name; | 1857 | const char *dname = dentry->d_name.name; |
1858 | struct audit_names *n, *found_parent = NULL, *found_child = NULL; | 1858 | struct audit_names *n, *found_parent = NULL, *found_child = NULL; |
1859 | 1859 | ||