diff options
author | Nathan Zimmer <nzimmer@sgi.com> | 2013-03-13 13:05:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-14 13:40:58 -0700 |
commit | 433121c6ef516e4a55d0dbc4c90d75f7a3084c55 (patch) | |
tree | 878bd99e8ac6e111d001fc6b1651d1c280badb2f /drivers/staging/dgrp | |
parent | 2c0fb1c969ddedf15b4d9d0c106f4dca82dffc21 (diff) |
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: Nathan Zimmer <nzimmer@sgi.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgrp')
-rw-r--r-- | drivers/staging/dgrp/dgrp_dpa_ops.c | 2 | ||||
-rw-r--r-- | drivers/staging/dgrp/dgrp_mon_ops.c | 2 | ||||
-rw-r--r-- | drivers/staging/dgrp/dgrp_net_ops.c | 2 | ||||
-rw-r--r-- | drivers/staging/dgrp/dgrp_ports_ops.c | 2 | ||||
-rw-r--r-- | drivers/staging/dgrp/dgrp_specproc.c | 6 |
5 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/dgrp/dgrp_dpa_ops.c b/drivers/staging/dgrp/dgrp_dpa_ops.c index 021cca498f2c..67fb3d6c45ea 100644 --- a/drivers/staging/dgrp/dgrp_dpa_ops.c +++ b/drivers/staging/dgrp/dgrp_dpa_ops.c @@ -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); diff --git a/drivers/staging/dgrp/dgrp_mon_ops.c b/drivers/staging/dgrp/dgrp_mon_ops.c index 4792d056a365..b484fccb494e 100644 --- a/drivers/staging/dgrp/dgrp_mon_ops.c +++ b/drivers/staging/dgrp/dgrp_mon_ops.c @@ -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); } diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c index f364e8e1722d..64f48ffb9d4e 100644 --- a/drivers/staging/dgrp/dgrp_net_ops.c +++ b/drivers/staging/dgrp/dgrp_net_ops.c @@ -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; diff --git a/drivers/staging/dgrp/dgrp_ports_ops.c b/drivers/staging/dgrp/dgrp_ports_ops.c index cd1fc2088624..f93dc1f262f5 100644 --- a/drivers/staging/dgrp/dgrp_ports_ops.c +++ b/drivers/staging/dgrp/dgrp_ports_ops.c @@ -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; } diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c index 73f287f96604..d66712c8aa94 100644 --- a/drivers/staging/dgrp/dgrp_specproc.c +++ b/drivers/staging/dgrp/dgrp_specproc.c @@ -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; |