diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-03 17:18:21 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-03 17:18:21 (GMT) |
commit | 4f9faaace217b854ae1e1746ee4ac44688ddadbd (patch) | |
tree | 34122d9e84349a394988d6bfc480115e4809776a /fs/proc | |
parent | bf640be423d60d954b9673527e106a461a129eb8 (diff) | |
parent | f37f2c62a28e848e06399ea2f9be1e098212625c (diff) | |
download | linux-4f9faaace217b854ae1e1746ee4ac44688ddadbd.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
rose: Wrong list_lock argument in rose_node seqops
netns: Fix reassembly timer to use the right namespace
netns: Fix device renaming for sysfs
bnx2: Update version to 1.7.5.
bnx2: Update RV2P firmware for 5709.
bnx2: Zero out context memory for 5709.
bnx2: Fix register test on 5709.
bnx2: Fix remote PHY initial link state.
bnx2: Refine remote PHY locking.
bridge: forwarding table information for >256 devices
tg3: Update version to 3.92
tg3: Add link state reporting to UMP firmware
tg3: Fix ethtool loopback test for 5761 BX devices
tg3: Fix 5761 NVRAM sizes
tg3: Use constant 500KHz MI clock on adapters with a CPMU
hci_usb.h: fix hard-to-trigger race
dccp: ccid2.c, ccid3.c use clamp(), clamp_t()
net: remove NR_CPUS arrays in net/core/dev.c
net: use get/put_unaligned_* helpers
bluetooth: use get/put_unaligned_* helpers
...
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/generic.c | 17 | ||||
-rw-r--r-- | fs/proc/proc_net.c | 11 |
2 files changed, 17 insertions, 11 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 9d53b39..43e54e8 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -641,6 +641,23 @@ struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, return ent; } +struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, + struct proc_dir_entry *parent) +{ + struct proc_dir_entry *ent; + + ent = __proc_create(&parent, name, S_IFDIR | S_IRUGO | S_IXUGO, 2); + if (ent) { + ent->data = net; + if (proc_register(parent, ent) < 0) { + kfree(ent); + ent = NULL; + } + } + return ent; +} +EXPORT_SYMBOL_GPL(proc_net_mkdir); + struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent) { diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 13cd783..83f357b 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -159,17 +159,6 @@ struct net *get_proc_net(const struct inode *inode) } EXPORT_SYMBOL_GPL(get_proc_net); -struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, - struct proc_dir_entry *parent) -{ - struct proc_dir_entry *pde; - pde = proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent); - if (pde != NULL) - pde->data = net; - return pde; -} -EXPORT_SYMBOL_GPL(proc_net_mkdir); - static __net_init int proc_net_ns_init(struct net *net) { struct proc_dir_entry *netd, *net_statd; |