Commit e5b6b5d4 authored by Ksenija Stanojevic's avatar Ksenija Stanojevic Committed by Greg Kroah-Hartman

Staging: lustre: Replace LPROCFS_CLIMP_EXIT with up_read

In all call sites type of argument that macro LPROCFS_CLIMP_EXIT
use is the same, so replace it with up_read function.
Also remove the macro since it's no longer used.
Signed-off-by: default avatarKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2cb0686
...@@ -624,9 +624,6 @@ void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, ...@@ -624,9 +624,6 @@ void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx,
int lprocfs_single_release(struct inode *, struct file *); int lprocfs_single_release(struct inode *, struct file *);
int lprocfs_seq_release(struct inode *, struct file *); int lprocfs_seq_release(struct inode *, struct file *);
#define LPROCFS_CLIMP_EXIT(obd) \
up_read(&(obd)->u.cli.cl_sem)
/* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only /* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only
proc entries; otherwise, you will define name##_seq_write function also for proc entries; otherwise, you will define name##_seq_write function also for
a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally, a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally,
......
...@@ -463,7 +463,7 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) ...@@ -463,7 +463,7 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
} }
spin_unlock(&config_list_lock); spin_unlock(&config_list_lock);
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
......
...@@ -502,7 +502,7 @@ int lprocfs_rd_server_uuid(struct seq_file *m, void *data) ...@@ -502,7 +502,7 @@ int lprocfs_rd_server_uuid(struct seq_file *m, void *data)
obd2cli_tgt(obd), imp_state_name, obd2cli_tgt(obd), imp_state_name,
imp->imp_deactive ? "\tDEACTIVATED" : ""); imp->imp_deactive ? "\tDEACTIVATED" : "");
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
...@@ -526,7 +526,7 @@ int lprocfs_rd_conn_uuid(struct seq_file *m, void *data) ...@@ -526,7 +526,7 @@ int lprocfs_rd_conn_uuid(struct seq_file *m, void *data)
else else
seq_puts(m, "<none>\n"); seq_puts(m, "<none>\n");
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
...@@ -765,7 +765,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -765,7 +765,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
} }
out_climp: out_climp:
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
EXPORT_SYMBOL(lprocfs_rd_import); EXPORT_SYMBOL(lprocfs_rd_import);
...@@ -796,7 +796,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data) ...@@ -796,7 +796,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data)
ptlrpc_import_state_name(ish->ish_state)); ptlrpc_import_state_name(ish->ish_state));
} }
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
EXPORT_SYMBOL(lprocfs_rd_state); EXPORT_SYMBOL(lprocfs_rd_state);
...@@ -857,7 +857,7 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data) ...@@ -857,7 +857,7 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data)
lprocfs_at_hist_helper(m, &imp->imp_at.iat_service_estimate[i]); lprocfs_at_hist_helper(m, &imp->imp_at.iat_service_estimate[i]);
} }
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
EXPORT_SYMBOL(lprocfs_rd_timeouts); EXPORT_SYMBOL(lprocfs_rd_timeouts);
...@@ -876,7 +876,7 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data) ...@@ -876,7 +876,7 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data)
seq_printf(m, "flags=%#llx\n", flags); seq_printf(m, "flags=%#llx\n", flags);
obd_connect_seq_flags2str(m, flags, "\n"); obd_connect_seq_flags2str(m, flags, "\n");
seq_printf(m, "\n"); seq_printf(m, "\n");
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
EXPORT_SYMBOL(lprocfs_rd_connect_flags); EXPORT_SYMBOL(lprocfs_rd_connect_flags);
......
...@@ -1197,7 +1197,7 @@ int lprocfs_wr_ping(struct file *file, const char __user *buffer, ...@@ -1197,7 +1197,7 @@ int lprocfs_wr_ping(struct file *file, const char __user *buffer,
return rc; return rc;
req = ptlrpc_prep_ping(obd->u.cli.cl_import); req = ptlrpc_prep_ping(obd->u.cli.cl_import);
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
if (req == NULL) if (req == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -1291,7 +1291,7 @@ int lprocfs_rd_pinger_recov(struct seq_file *m, void *n) ...@@ -1291,7 +1291,7 @@ int lprocfs_rd_pinger_recov(struct seq_file *m, void *n)
return rc; return rc;
seq_printf(m, "%d\n", !imp->imp_no_pinger_recover); seq_printf(m, "%d\n", !imp->imp_no_pinger_recover);
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
...@@ -1319,7 +1319,7 @@ int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer, ...@@ -1319,7 +1319,7 @@ int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer,
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
imp->imp_no_pinger_recover = !val; imp->imp_no_pinger_recover = !val;
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
LPROCFS_CLIMP_EXIT(obd); up_read(&obd->u.cli.cl_sem);
return count; return count;
......
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