mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
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 <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b2cb068604
commit
e5b6b5d48f
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user