aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2015-03-17 18:26:16 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-15 15:06:55 -0400
commit7682c918439d42291df0d76b3e06627f27fbcdef (patch)
tree792147ca93d5d36cdf59aa0860920a133434aec4 /kernel
parent3b362157b2162719145d4f3d4f534357d89b45ce (diff)
VFS: kernel/: d_inode() annotations
relayfs and tracefs are dealing with inodes of their own; those two act as filesystem drivers Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/relay.c4
-rw-r--r--kernel/trace/trace.c8
-rw-r--r--kernel/trace/trace_events.c4
-rw-r--r--kernel/trace/trace_uprobe.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/kernel/relay.c b/kernel/relay.c
index 5a56d3c8dc03..e9dbaeb8fd65 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -407,7 +407,7 @@ static inline void relay_set_buf_dentry(struct rchan_buf *buf,
407 struct dentry *dentry) 407 struct dentry *dentry)
408{ 408{
409 buf->dentry = dentry; 409 buf->dentry = dentry;
410 buf->dentry->d_inode->i_size = buf->early_bytes; 410 d_inode(buf->dentry)->i_size = buf->early_bytes;
411} 411}
412 412
413static struct dentry *relay_create_buf_file(struct rchan *chan, 413static struct dentry *relay_create_buf_file(struct rchan *chan,
@@ -733,7 +733,7 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length)
733 buf->padding[old_subbuf] = buf->prev_padding; 733 buf->padding[old_subbuf] = buf->prev_padding;
734 buf->subbufs_produced++; 734 buf->subbufs_produced++;
735 if (buf->dentry) 735 if (buf->dentry)
736 buf->dentry->d_inode->i_size += 736 d_inode(buf->dentry)->i_size +=
737 buf->chan->subbuf_size - 737 buf->chan->subbuf_size -
738 buf->padding[old_subbuf]; 738 buf->padding[old_subbuf];
739 else 739 else
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 62c6506d663f..d44901bcd867 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5846,7 +5846,7 @@ trace_create_cpu_file(const char *name, umode_t mode, struct dentry *parent,
5846 struct dentry *ret = trace_create_file(name, mode, parent, data, fops); 5846 struct dentry *ret = trace_create_file(name, mode, parent, data, fops);
5847 5847
5848 if (ret) /* See tracing_get_cpu() */ 5848 if (ret) /* See tracing_get_cpu() */
5849 ret->d_inode->i_cdev = (void *)(cpu + 1); 5849 d_inode(ret)->i_cdev = (void *)(cpu + 1);
5850 return ret; 5850 return ret;
5851} 5851}
5852 5852
@@ -6420,7 +6420,7 @@ static int instance_rmdir(struct inode *inode, struct dentry *dentry)
6420 return -ENOENT; 6420 return -ENOENT;
6421 6421
6422 /* The caller did a dget() on dentry */ 6422 /* The caller did a dget() on dentry */
6423 mutex_unlock(&dentry->d_inode->i_mutex); 6423 mutex_unlock(&d_inode(dentry)->i_mutex);
6424 6424
6425 /* 6425 /*
6426 * The inode mutex is locked, but debugfs_create_dir() will also 6426 * The inode mutex is locked, but debugfs_create_dir() will also
@@ -6435,7 +6435,7 @@ static int instance_rmdir(struct inode *inode, struct dentry *dentry)
6435 ret = instance_delete(dentry->d_iname); 6435 ret = instance_delete(dentry->d_iname);
6436 6436
6437 mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT); 6437 mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
6438 mutex_lock(&dentry->d_inode->i_mutex); 6438 mutex_lock(&d_inode(dentry)->i_mutex);
6439 6439
6440 return ret; 6440 return ret;
6441} 6441}
@@ -6453,7 +6453,7 @@ static __init void create_trace_instances(struct dentry *d_tracer)
6453 return; 6453 return;
6454 6454
6455 /* Hijack the dir inode operations, to allow mkdir */ 6455 /* Hijack the dir inode operations, to allow mkdir */
6456 trace_instance_dir->d_inode->i_op = &instance_dir_inode_operations; 6456 d_inode(trace_instance_dir)->i_op = &instance_dir_inode_operations;
6457} 6457}
6458 6458
6459static void 6459static void
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index db54dda10ccc..e19e7578a0d3 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -494,8 +494,8 @@ static void remove_event_file_dir(struct ftrace_event_file *file)
494 if (dir) { 494 if (dir) {
495 spin_lock(&dir->d_lock); /* probably unneeded */ 495 spin_lock(&dir->d_lock); /* probably unneeded */
496 list_for_each_entry(child, &dir->d_subdirs, d_child) { 496 list_for_each_entry(child, &dir->d_subdirs, d_child) {
497 if (child->d_inode) /* probably unneeded */ 497 if (d_really_is_positive(child)) /* probably unneeded */
498 child->d_inode->i_private = NULL; 498 d_inode(child)->i_private = NULL;
499 } 499 }
500 spin_unlock(&dir->d_lock); 500 spin_unlock(&dir->d_lock);
501 501
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 7dc1c8abecd6..cb3b37e533cd 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -443,7 +443,7 @@ static int create_trace_uprobe(int argc, char **argv)
443 if (ret) 443 if (ret)
444 goto fail_address_parse; 444 goto fail_address_parse;
445 445
446 inode = igrab(path.dentry->d_inode); 446 inode = igrab(d_inode(path.dentry));
447 path_put(&path); 447 path_put(&path);
448 448
449 if (!inode || !S_ISREG(inode->i_mode)) { 449 if (!inode || !S_ISREG(inode->i_mode)) {