aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit_watch.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:26:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:55 -0400
commit3b362157b2162719145d4f3d4f534357d89b45ce (patch)
tree20b1a73d33e66ce138253f19fec744b619fcb0ce /kernel/audit_watch.c
parentc1d81b1cf937027d23f7e53cdd12328799028c6a (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>
Diffstat (limited to 'kernel/audit_watch.c')
-rw-r--r--kernel/audit_watch.c14
1 files changed, 7 insertions, 7 deletions
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. */
147static struct audit_parent *audit_init_parent(struct path *path) 147static 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;