aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/inode.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-03 21:16:48 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-03 21:16:48 -0500
commit71a83a6db6138b9d41d8a0b6b91cb59f6dc4742c (patch)
treef74b6e4e48257ec6ce40b95645ecb8533b9cc1f8 /fs/proc/inode.c
parentb97526f3ff95f92b107f0fb52cbb8627e395429b (diff)
parenta6c5170d1edea97c538c81e377e56c7b5c5b7e63 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/rocker/rocker.c The rocker commit was two overlapping changes, one to rename the ->vport member to ->pport, and another making the bitmask expression use '1ULL' instead of plain '1'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r--fs/proc/inode.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 13a50a32652d..7697b6621cfd 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -23,6 +23,7 @@
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/mount.h> 24#include <linux/mount.h>
25#include <linux/magic.h> 25#include <linux/magic.h>
26#include <linux/namei.h>
26 27
27#include <asm/uaccess.h> 28#include <asm/uaccess.h>
28 29
@@ -393,6 +394,26 @@ static const struct file_operations proc_reg_file_ops_no_compat = {
393}; 394};
394#endif 395#endif
395 396
397static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
398{
399 struct proc_dir_entry *pde = PDE(dentry->d_inode);
400 if (unlikely(!use_pde(pde)))
401 return ERR_PTR(-EINVAL);
402 nd_set_link(nd, pde->data);
403 return pde;
404}
405
406static void proc_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
407{
408 unuse_pde(p);
409}
410
411const struct inode_operations proc_link_inode_operations = {
412 .readlink = generic_readlink,
413 .follow_link = proc_follow_link,
414 .put_link = proc_put_link,
415};
416
396struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) 417struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
397{ 418{
398 struct inode *inode = new_inode_pseudo(sb); 419 struct inode *inode = new_inode_pseudo(sb);