Commit 433121c6 authored by Nathan Zimmer's avatar Nathan Zimmer Committed by Greg Kroah-Hartman

staging: dgrp: cleanup sparse warnings

A cleanup patch to remove sparse warnings caused by my other patch
"procfs: Improve Scaling in proc" since now proc_fops is protected by the rcu.
Signed-off-by: default avatarNathan Zimmer <nzimmer@sgi.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c0fb1c9
......@@ -116,7 +116,7 @@ void dgrp_register_dpa_hook(struct proc_dir_entry *de)
struct nd_struct *node = de->data;
de->proc_iops = &dpa_inode_ops;
de->proc_fops = &dpa_ops;
rcu_assign_pointer(de->proc_fops, &dpa_ops);
node->nd_dpa_de = de;
spin_lock_init(&node->nd_dpa_lock);
......
......@@ -66,7 +66,7 @@ void dgrp_register_mon_hook(struct proc_dir_entry *de)
struct nd_struct *node = de->data;
de->proc_iops = &mon_inode_ops;
de->proc_fops = &mon_ops;
rcu_assign_pointer(de->proc_fops, &mon_ops);
node->nd_mon_de = de;
sema_init(&node->nd_mon_semaphore, 1);
}
......
......@@ -91,7 +91,7 @@ void dgrp_register_net_hook(struct proc_dir_entry *de)
struct nd_struct *node = de->data;
de->proc_iops = &net_inode_ops;
de->proc_fops = &net_ops;
rcu_assign_pointer(de->proc_fops, &net_ops);
node->nd_net_de = de;
sema_init(&node->nd_net_semaphore, 1);
node->nd_state = NS_CLOSED;
......
......@@ -65,7 +65,7 @@ void dgrp_register_ports_hook(struct proc_dir_entry *de)
struct nd_struct *node = de->data;
de->proc_iops = &ports_inode_ops;
de->proc_fops = &ports_ops;
rcu_assign_pointer(de->proc_fops, &ports_ops);
node->nd_ports_de = de;
}
......
......@@ -271,9 +271,11 @@ static void register_proc_table(struct dgrp_proc_entry *table,
if (!table->child) {
de->proc_iops = &proc_inode_ops;
if (table->proc_file_ops)
de->proc_fops = table->proc_file_ops;
rcu_assign_pointer(de->proc_fops,
table->proc_file_ops);
else
de->proc_fops = &dgrp_proc_file_ops;
rcu_assign_pointer(de->proc_fops,
&dgrp_proc_file_ops);
}
}
table->de = de;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment