diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
commit | 20b4fb485227404329e41ad15588afad3df23050 (patch) | |
tree | f3e099f0ab3da8a93b447203e294d2bb22f6dc05 /net/core | |
parent | b9394d8a657cd3c064fa432aa0905c1b58b38fe9 (diff) | |
parent | ac3e3c5b1164397656df81b9e9ab4991184d3236 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,
Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).
7kloc removed.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
don't bother with deferred freeing of fdtables
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
proc: Make the PROC_I() and PDE() macros internal to procfs
proc: Supply a function to remove a proc entry by PDE
take cgroup_open() and cpuset_open() to fs/proc/base.c
ppc: Clean up scanlog
ppc: Clean up rtas_flash driver somewhat
hostap: proc: Use remove_proc_subtree()
drm: proc: Use remove_proc_subtree()
drm: proc: Use minor->index to label things, not PDE->name
drm: Constify drm_proc_list[]
zoran: Don't print proc_dir_entry data in debug
reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
proc: Supply an accessor for getting the data from a PDE's parent
airo: Use remove_proc_subtree()
rtl8192u: Don't need to save device proc dir PDE
rtl8187se: Use a dir under /proc/net/r8180/
proc: Add proc_mkdir_data()
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
proc: Move PDE_NET() to fs/proc/proc_net.c
...
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 2 | ||||
-rw-r--r-- | net/core/net_namespace.c | 7 | ||||
-rw-r--r-- | net/core/pktgen.c | 12 |
3 files changed, 10 insertions, 11 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 89a3a07d85fb..5c56b217b999 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2705,7 +2705,7 @@ static int neigh_stat_seq_open(struct inode *inode, struct file *file) | |||
2705 | 2705 | ||
2706 | if (!ret) { | 2706 | if (!ret) { |
2707 | struct seq_file *sf = file->private_data; | 2707 | struct seq_file *sf = file->private_data; |
2708 | sf->private = PDE(inode)->data; | 2708 | sf->private = PDE_DATA(inode); |
2709 | } | 2709 | } |
2710 | return ret; | 2710 | return ret; |
2711 | }; | 2711 | }; |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 80e271d9e64b..f97652036754 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -10,7 +10,8 @@ | |||
10 | #include <linux/idr.h> | 10 | #include <linux/idr.h> |
11 | #include <linux/rculist.h> | 11 | #include <linux/rculist.h> |
12 | #include <linux/nsproxy.h> | 12 | #include <linux/nsproxy.h> |
13 | #include <linux/proc_fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/proc_ns.h> | ||
14 | #include <linux/file.h> | 15 | #include <linux/file.h> |
15 | #include <linux/export.h> | 16 | #include <linux/export.h> |
16 | #include <linux/user_namespace.h> | 17 | #include <linux/user_namespace.h> |
@@ -336,7 +337,7 @@ EXPORT_SYMBOL_GPL(__put_net); | |||
336 | 337 | ||
337 | struct net *get_net_ns_by_fd(int fd) | 338 | struct net *get_net_ns_by_fd(int fd) |
338 | { | 339 | { |
339 | struct proc_inode *ei; | 340 | struct proc_ns *ei; |
340 | struct file *file; | 341 | struct file *file; |
341 | struct net *net; | 342 | struct net *net; |
342 | 343 | ||
@@ -344,7 +345,7 @@ struct net *get_net_ns_by_fd(int fd) | |||
344 | if (IS_ERR(file)) | 345 | if (IS_ERR(file)) |
345 | return ERR_CAST(file); | 346 | return ERR_CAST(file); |
346 | 347 | ||
347 | ei = PROC_I(file_inode(file)); | 348 | ei = get_proc_ns(file_inode(file)); |
348 | if (ei->ns_ops == &netns_operations) | 349 | if (ei->ns_ops == &netns_operations) |
349 | net = get_net(ei->ns); | 350 | net = get_net(ei->ns); |
350 | else | 351 | else |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 5c217427a669..11f2704c3810 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -508,7 +508,7 @@ out: | |||
508 | 508 | ||
509 | static int pgctrl_open(struct inode *inode, struct file *file) | 509 | static int pgctrl_open(struct inode *inode, struct file *file) |
510 | { | 510 | { |
511 | return single_open(file, pgctrl_show, PDE(inode)->data); | 511 | return single_open(file, pgctrl_show, PDE_DATA(inode)); |
512 | } | 512 | } |
513 | 513 | ||
514 | static const struct file_operations pktgen_fops = { | 514 | static const struct file_operations pktgen_fops = { |
@@ -1685,7 +1685,7 @@ static ssize_t pktgen_if_write(struct file *file, | |||
1685 | 1685 | ||
1686 | static int pktgen_if_open(struct inode *inode, struct file *file) | 1686 | static int pktgen_if_open(struct inode *inode, struct file *file) |
1687 | { | 1687 | { |
1688 | return single_open(file, pktgen_if_show, PDE(inode)->data); | 1688 | return single_open(file, pktgen_if_show, PDE_DATA(inode)); |
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | static const struct file_operations pktgen_if_fops = { | 1691 | static const struct file_operations pktgen_if_fops = { |
@@ -1823,7 +1823,7 @@ out: | |||
1823 | 1823 | ||
1824 | static int pktgen_thread_open(struct inode *inode, struct file *file) | 1824 | static int pktgen_thread_open(struct inode *inode, struct file *file) |
1825 | { | 1825 | { |
1826 | return single_open(file, pktgen_thread_show, PDE(inode)->data); | 1826 | return single_open(file, pktgen_thread_show, PDE_DATA(inode)); |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | static const struct file_operations pktgen_thread_fops = { | 1829 | static const struct file_operations pktgen_thread_fops = { |
@@ -1904,7 +1904,7 @@ static void pktgen_change_name(const struct pktgen_net *pn, struct net_device *d | |||
1904 | if (pkt_dev->odev != dev) | 1904 | if (pkt_dev->odev != dev) |
1905 | continue; | 1905 | continue; |
1906 | 1906 | ||
1907 | remove_proc_entry(pkt_dev->entry->name, pn->proc_dir); | 1907 | proc_remove(pkt_dev->entry); |
1908 | 1908 | ||
1909 | pkt_dev->entry = proc_create_data(dev->name, 0600, | 1909 | pkt_dev->entry = proc_create_data(dev->name, 0600, |
1910 | pn->proc_dir, | 1910 | pn->proc_dir, |
@@ -3574,8 +3574,6 @@ static void _rem_dev_from_if_list(struct pktgen_thread *t, | |||
3574 | static int pktgen_remove_device(struct pktgen_thread *t, | 3574 | static int pktgen_remove_device(struct pktgen_thread *t, |
3575 | struct pktgen_dev *pkt_dev) | 3575 | struct pktgen_dev *pkt_dev) |
3576 | { | 3576 | { |
3577 | struct pktgen_net *pn = t->net; | ||
3578 | |||
3579 | pr_debug("remove_device pkt_dev=%p\n", pkt_dev); | 3577 | pr_debug("remove_device pkt_dev=%p\n", pkt_dev); |
3580 | 3578 | ||
3581 | if (pkt_dev->running) { | 3579 | if (pkt_dev->running) { |
@@ -3595,7 +3593,7 @@ static int pktgen_remove_device(struct pktgen_thread *t, | |||
3595 | _rem_dev_from_if_list(t, pkt_dev); | 3593 | _rem_dev_from_if_list(t, pkt_dev); |
3596 | 3594 | ||
3597 | if (pkt_dev->entry) | 3595 | if (pkt_dev->entry) |
3598 | remove_proc_entry(pkt_dev->entry->name, pn->proc_dir); | 3596 | proc_remove(pkt_dev->entry); |
3599 | 3597 | ||
3600 | #ifdef CONFIG_XFRM | 3598 | #ifdef CONFIG_XFRM |
3601 | free_SAs(pkt_dev); | 3599 | free_SAs(pkt_dev); |