summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /kernel
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro: "d_inode() annotations from David Howells (sat in for-next since before the beginning of merge window) + four assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() VFS: assorted d_backing_inode() annotations VFS: fs/inode.c helpers: d_inode() annotations VFS: fs/cachefiles: d_backing_inode() annotations VFS: fs library helpers: d_inode() annotations VFS: assorted weird filesystems: d_inode() annotations VFS: normal filesystems (and lustre): d_inode() annotations VFS: security/: d_inode() annotations VFS: security/: d_backing_inode() annotations VFS: net/: d_inode() annotations VFS: net/unix: d_backing_inode() annotations VFS: kernel/: d_inode() annotations VFS: audit: d_backing_inode() annotations VFS: Fix up some ->d_inode accesses in the chelsio driver VFS: Cachefiles should perform fs modifications on the top layer only VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c2
-rw-r--r--kernel/audit_tree.c4
-rw-r--r--kernel/audit_watch.c14
-rw-r--r--kernel/auditsc.c6
-rw-r--r--kernel/relay.c4
-rw-r--r--kernel/trace/trace.c2
-rw-r--r--kernel/trace/trace_events.c4
-rw-r--r--kernel/trace/trace_uprobe.c2
8 files changed, 19 insertions, 19 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index ab5745ddf962..1c13e4267de6 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1928,7 +1928,7 @@ void audit_log_link_denied(const char *operation, struct path *link)
1928 1928
1929 /* Generate AUDIT_PATH record with object. */ 1929 /* Generate AUDIT_PATH record with object. */
1930 name->type = AUDIT_TYPE_NORMAL; 1930 name->type = AUDIT_TYPE_NORMAL;
1931 audit_copy_inode(name, link->dentry, link->dentry->d_inode); 1931 audit_copy_inode(name, link->dentry, d_backing_inode(link->dentry));
1932 audit_log_name(current->audit_context, name, link, 0, NULL); 1932 audit_log_name(current->audit_context, name, link, 0, NULL);
1933out: 1933out:
1934 kfree(name); 1934 kfree(name);
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 71fd1f289885..b0f9877273fc 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -577,7 +577,7 @@ int audit_remove_tree_rule(struct audit_krule *rule)
577 577
578static int compare_root(struct vfsmount *mnt, void *arg) 578static int compare_root(struct vfsmount *mnt, void *arg)
579{ 579{
580 return mnt->mnt_root->d_inode == arg; 580 return d_backing_inode(mnt->mnt_root) == arg;
581} 581}
582 582
583void audit_trim_trees(void) 583void audit_trim_trees(void)
@@ -649,7 +649,7 @@ void audit_put_tree(struct audit_tree *tree)
649 649
650static int tag_mount(struct vfsmount *mnt, void *arg) 650static int tag_mount(struct vfsmount *mnt, void *arg)
651{ 651{
652 return tag_chunk(mnt->mnt_root->d_inode, arg); 652 return tag_chunk(d_backing_inode(mnt->mnt_root), arg);
653} 653}
654 654
655/* 655/*
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;
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 84c74d08c62b..9fb9d1cb83ce 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
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 91eecaaa43e0..05330494a0df 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6079,7 +6079,7 @@ trace_create_cpu_file(const char *name, umode_t mode, struct dentry *parent,
6079 struct dentry *ret = trace_create_file(name, mode, parent, data, fops); 6079 struct dentry *ret = trace_create_file(name, mode, parent, data, fops);
6080 6080
6081 if (ret) /* See tracing_get_cpu() */ 6081 if (ret) /* See tracing_get_cpu() */
6082 ret->d_inode->i_cdev = (void *)(cpu + 1); 6082 d_inode(ret)->i_cdev = (void *)(cpu + 1);
6083 return ret; 6083 return ret;
6084} 6084}
6085 6085
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 3ab69fb72b85..c4de47fc5cca 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 d60fe62ec4fa..6dd022c7b5bc 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)) {