Staging: lustre: Replace LPROCFS_CLIMP_EXIT with up_read
PATCH v3 1/1 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 Ksenija Stanojevic <[email protected]>
---
Changes in v3:
- drop unnecessary parentheses.
Changes in v2:
- remove macro in this patch and not in separate one.
- use up_read and not a static inline wrapper function
drivers/staging/lustre/lustre/include/lprocfs_status.h | 3 --- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 12 ++++++------ drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 6 +++--- 4 files changed, 10 insertions(+), 13 deletions(-)
drivers/staging/lustre/lustre/include/lprocfs_status.h +0 -3
@@ -624,9 +624,6 @@ void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx,int lprocfs_single_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 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,
drivers/staging/lustre/lustre/mgc/mgc_request.c +1 -1
@@ -463,7 +463,7 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) }spin_unlock (&config_list_lock); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +6 -6
@@ -502,7 +502,7 @@ int lprocfs_rd_server_uuid(struct seq_file *m, void *data)obd2cli_tgt (obd), imp_state_name, imp->imp_deactive ? "\tDEACTIVATED" : ""); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }
@@ -526,7 +526,7 @@ int lprocfs_rd_conn_uuid(struct seq_file *m, void *data)else seq_puts (m,"<none>\n" ); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }
@@ -765,7 +765,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data) } out_climp: -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }EXPORT_SYMBOL (lprocfs_rd_import);
@@ -796,7 +796,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data) ptlrpc_import_state_name(ish->ish_state)); } -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }EXPORT_SYMBOL (lprocfs_rd_state);
@@ -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_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }EXPORT_SYMBOL (lprocfs_rd_timeouts);
@@ -876,7 +876,7 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data)seq_printf (m,"flags=%#llx\n" , flags);obd_connect_seq_flags2str (m, flags,"\n" );seq_printf (m,"\n" ); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }EXPORT_SYMBOL (lprocfs_rd_connect_flags);
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +3 -3
@@ -1197,7 +1197,7 @@ int lprocfs_wr_ping(struct file *file, const char __user *buffer,return rc; req =ptlrpc_prep_ping (obd->u.cli.cl_import); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);if (req ==NULL )return -ENOMEM ;
@@ -1291,7 +1291,7 @@ int lprocfs_rd_pinger_recov(struct seq_file *m, void *n)return rc;seq_printf (m,"%d\n" , !imp->imp_no_pinger_recover); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return 0 ; }
@@ -1319,7 +1319,7 @@ int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer,spin_lock (&imp->imp_lock); imp->imp_no_pinger_recover = !val;spin_unlock (&imp->imp_lock); -LPROCFS_CLIMP_EXIT (obd); +up_read (&obd->u.cli.cl_sem);return count;
Signature · 1 line
1.9.1