Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370123
b: refs/heads/master
c: 4a520d2
h: refs/heads/master
i:
  370121: b59ea88
  370119: db3ee9d
v: v3
  • Loading branch information
David Howells authored and Al Viro committed May 1, 2013
1 parent 4610c9e commit b606643
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b25f774d889e3856c6d81ffc679912f8bdef6adc
refs/heads/master: 4a520d2769beb736ba2bd084b8293ce148a1a7ae
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/megaraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ proc_show_rdrv_40(struct seq_file *m, void *v)
*/
static int mega_proc_open(struct inode *inode, struct file *file)
{
adapter_t *adapter = PDE(inode)->parent->data;
adapter_t *adapter = proc_get_parent_data(inode);
int (*show)(struct seq_file *, void *) = PDE_DATA(inode);

return single_open(file, show, adapter);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void rtl8180_proc_remove_one(struct net_device *dev)
*/
static int rtl8180_proc_open(struct inode *inode, struct file *file)
{
struct net_device *dev = PDE(inode)->parent->data;
struct net_device *dev = proc_get_parent_data(inode);
int (*show)(struct seq_file *, void *) = PDE_DATA(inode);

return single_open(file, show, dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/rtl8192u/r8192U_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void rtl8192_proc_module_remove(void)
*/
static int rtl8192_proc_open(struct inode *inode, struct file *file)
{
struct net_device *dev = PDE(inode)->parent->data;
struct net_device *dev = proc_get_parent_data(inode);
int (*show)(struct seq_file *, void *) = PDE_DATA(inode);

return single_open(file, show, dev);
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,3 +617,10 @@ int remove_proc_subtree(const char *name, struct proc_dir_entry *parent)
return 0;
}
EXPORT_SYMBOL(remove_proc_subtree);

void *proc_get_parent_data(const struct inode *inode)
{
struct proc_dir_entry *de = PDE(inode);
return de->parent->data;
}
EXPORT_SYMBOL_GPL(proc_get_parent_data);
1 change: 1 addition & 0 deletions trunk/include/linux/proc_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode,

extern void proc_set_size(struct proc_dir_entry *, loff_t);
extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
extern void *proc_get_parent_data(const struct inode *);
#else

static inline void proc_flush_task(struct task_struct *task)
Expand Down

0 comments on commit b606643

Please sign in to comment.