diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 19:10:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 19:10:49 -0500 |
commit | cbfe0de303a55ed96d8831c2d5f56f8131cd6612 (patch) | |
tree | b327762303c6a015421e4077e7c713b8a47a5e0e /kernel | |
parent | 8322b6fddfd2cee41a7732284e5f04750511f4b2 (diff) | |
parent | ba00410b8131b23edfb0e09f8b6dd26c8eb621fb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS changes from Al Viro:
"First pile out of several (there _definitely_ will be more). Stuff in
this one:
- unification of d_splice_alias()/d_materialize_unique()
- iov_iter rewrite
- killing a bunch of ->f_path.dentry users (and f_dentry macro).
Getting that completed will make life much simpler for
unionmount/overlayfs, since then we'll be able to limit the places
sensitive to file _dentry_ to reasonably few. Which allows to have
file_inode(file) pointing to inode in a covered layer, with dentry
pointing to (negative) dentry in union one.
Still not complete, but much closer now.
- crapectomy in lustre (dead code removal, mostly)
- "let's make seq_printf return nothing" preparations
- assorted cleanups and fixes
There _definitely_ will be more piles"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
copy_from_iter_nocache()
new helper: iov_iter_kvec()
csum_and_copy_..._iter()
iov_iter.c: handle ITER_KVEC directly
iov_iter.c: convert copy_to_iter() to iterate_and_advance
iov_iter.c: convert copy_from_iter() to iterate_and_advance
iov_iter.c: get rid of bvec_copy_page_{to,from}_iter()
iov_iter.c: convert iov_iter_zero() to iterate_and_advance
iov_iter.c: convert iov_iter_get_pages_alloc() to iterate_all_kinds
iov_iter.c: convert iov_iter_get_pages() to iterate_all_kinds
iov_iter.c: convert iov_iter_npages() to iterate_all_kinds
iov_iter.c: iterate_and_advance
iov_iter.c: macros for iterating over iov_iter
kill f_dentry macro
dcache: fix kmemcheck warning in switch_names
new helper: audit_file()
nfsd_vfs_write(): use file_inode()
ncpfs: use file_inode()
kill f_dentry uses
lockd: get rid of ->f_path.dentry->d_sb
...
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditsc.c | 7 | ||||
-rw-r--r-- | kernel/events/core.c | 2 | ||||
-rw-r--r-- | kernel/taskstats.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace.c | 4 | ||||
-rw-r--r-- | kernel/trace/trace_events.c | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index e420a0c41b5f..c75522a83678 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1897,6 +1897,11 @@ out: | |||
1897 | audit_copy_inode(n, dentry, inode); | 1897 | audit_copy_inode(n, dentry, inode); |
1898 | } | 1898 | } |
1899 | 1899 | ||
1900 | void __audit_file(const struct file *file) | ||
1901 | { | ||
1902 | __audit_inode(NULL, file->f_path.dentry, 0); | ||
1903 | } | ||
1904 | |||
1900 | /** | 1905 | /** |
1901 | * __audit_inode_child - collect inode info for created/removed objects | 1906 | * __audit_inode_child - collect inode info for created/removed objects |
1902 | * @parent: inode of dentry parent | 1907 | * @parent: inode of dentry parent |
@@ -2373,7 +2378,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
2373 | ax->d.next = context->aux; | 2378 | ax->d.next = context->aux; |
2374 | context->aux = (void *)ax; | 2379 | context->aux = (void *)ax; |
2375 | 2380 | ||
2376 | dentry = dget(bprm->file->f_dentry); | 2381 | dentry = dget(bprm->file->f_path.dentry); |
2377 | get_vfs_caps_from_disk(dentry, &vcaps); | 2382 | get_vfs_caps_from_disk(dentry, &vcaps); |
2378 | dput(dentry); | 2383 | dput(dentry); |
2379 | 2384 | ||
diff --git a/kernel/events/core.c b/kernel/events/core.c index 3e19d3ebc29c..113b837470cd 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -614,7 +614,7 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event, | |||
614 | if (!f.file) | 614 | if (!f.file) |
615 | return -EBADF; | 615 | return -EBADF; |
616 | 616 | ||
617 | css = css_tryget_online_from_dir(f.file->f_dentry, | 617 | css = css_tryget_online_from_dir(f.file->f_path.dentry, |
618 | &perf_event_cgrp_subsys); | 618 | &perf_event_cgrp_subsys); |
619 | if (IS_ERR(css)) { | 619 | if (IS_ERR(css)) { |
620 | ret = PTR_ERR(css); | 620 | ret = PTR_ERR(css); |
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index b312fcc73024..670fff88a961 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -459,7 +459,7 @@ static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info) | |||
459 | stats = nla_data(na); | 459 | stats = nla_data(na); |
460 | memset(stats, 0, sizeof(*stats)); | 460 | memset(stats, 0, sizeof(*stats)); |
461 | 461 | ||
462 | rc = cgroupstats_build(stats, f.file->f_dentry); | 462 | rc = cgroupstats_build(stats, f.file->f_path.dentry); |
463 | if (rc < 0) { | 463 | if (rc < 0) { |
464 | nlmsg_free(rep_skb); | 464 | nlmsg_free(rep_skb); |
465 | goto err; | 465 | goto err; |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 92f4a6cee172..426962b04183 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -6417,7 +6417,7 @@ static int instance_mkdir (struct inode *inode, struct dentry *dentry, umode_t m | |||
6417 | int ret; | 6417 | int ret; |
6418 | 6418 | ||
6419 | /* Paranoid: Make sure the parent is the "instances" directory */ | 6419 | /* Paranoid: Make sure the parent is the "instances" directory */ |
6420 | parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); | 6420 | parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); |
6421 | if (WARN_ON_ONCE(parent != trace_instance_dir)) | 6421 | if (WARN_ON_ONCE(parent != trace_instance_dir)) |
6422 | return -ENOENT; | 6422 | return -ENOENT; |
6423 | 6423 | ||
@@ -6444,7 +6444,7 @@ static int instance_rmdir(struct inode *inode, struct dentry *dentry) | |||
6444 | int ret; | 6444 | int ret; |
6445 | 6445 | ||
6446 | /* Paranoid: Make sure the parent is the "instances" directory */ | 6446 | /* Paranoid: Make sure the parent is the "instances" directory */ |
6447 | parent = hlist_entry(inode->i_dentry.first, struct dentry, d_alias); | 6447 | parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias); |
6448 | if (WARN_ON_ONCE(parent != trace_instance_dir)) | 6448 | if (WARN_ON_ONCE(parent != trace_instance_dir)) |
6449 | return -ENOENT; | 6449 | return -ENOENT; |
6450 | 6450 | ||
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 0cc51edde3a8..1b0df1e504f0 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -461,7 +461,7 @@ static void remove_event_file_dir(struct ftrace_event_file *file) | |||
461 | 461 | ||
462 | if (dir) { | 462 | if (dir) { |
463 | spin_lock(&dir->d_lock); /* probably unneeded */ | 463 | spin_lock(&dir->d_lock); /* probably unneeded */ |
464 | list_for_each_entry(child, &dir->d_subdirs, d_u.d_child) { | 464 | list_for_each_entry(child, &dir->d_subdirs, d_child) { |
465 | if (child->d_inode) /* probably unneeded */ | 465 | if (child->d_inode) /* probably unneeded */ |
466 | child->d_inode->i_private = NULL; | 466 | child->d_inode->i_private = NULL; |
467 | } | 467 | } |