This patch fixes issues reported by checkpatch for
file lustre/ptlrpc/sec_gc.c
Change-Id: I19f9f86aba86417b31245da4246c2d6eeb0a3752
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/34551
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
{
void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
{
- LASSERT(sec->ps_policy->sp_cops->gc_ctx);
- LASSERT(sec->ps_gc_interval > 0);
+ LASSERT(sec->ps_policy->sp_cops->gc_ctx);
+ LASSERT(sec->ps_gc_interval > 0);
LASSERT(list_empty(&sec->ps_gc_list));
sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
LASSERT(list_empty(&sec->ps_gc_list));
sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
static void sec_do_gc(struct ptlrpc_sec *sec)
{
static void sec_do_gc(struct ptlrpc_sec *sec)
{
- LASSERT(sec->ps_policy->sp_cops->gc_ctx);
+ LASSERT(sec->ps_policy->sp_cops->gc_ctx);
- if (unlikely(sec->ps_gc_next == 0)) {
- CDEBUG(D_SEC, "sec %p(%s) has 0 gc time\n",
- sec, sec->ps_policy->sp_name);
- return;
- }
+ if (unlikely(sec->ps_gc_next == 0)) {
+ CDEBUG(D_SEC, "sec %p(%s) has 0 gc time\n",
+ sec, sec->ps_policy->sp_name);
+ return;
+ }
- CDEBUG(D_SEC, "check on sec %p(%s)\n", sec, sec->ps_policy->sp_name);
+ CDEBUG(D_SEC, "check on sec %p(%s)\n", sec, sec->ps_policy->sp_name);
if (sec->ps_gc_next > ktime_get_real_seconds())
if (sec->ps_gc_next > ktime_get_real_seconds())
- sec->ps_policy->sp_cops->gc_ctx(sec);
+ sec->ps_policy->sp_cops->gc_ctx(sec);
sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
}
sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
}
sec_process_ctx_list();
again:
sec_process_ctx_list();
again:
- /* go through sec list do gc.
+ /*
+ * go through sec list do gc.
* FIXME here we iterate through the whole list each time which
* is not optimal. we perhaps want to use balanced binary tree
* to trace each sec as order of expiry time.
* FIXME here we iterate through the whole list each time which
* is not optimal. we perhaps want to use balanced binary tree
* to trace each sec as order of expiry time.
*/
mutex_lock(&sec_gc_mutex);
list_for_each_entry(sec, &sec_gc_list, ps_gc_list) {
*/
mutex_lock(&sec_gc_mutex);
list_for_each_entry(sec, &sec_gc_list, ps_gc_list) {
- /* if someone is waiting to be deleted, let it
+ /*
+ * if someone is waiting to be deleted, let it
* proceed as soon as possible.
*/
if (atomic_read(&sec_gc_wait_del)) {
* proceed as soon as possible.
*/
if (atomic_read(&sec_gc_wait_del)) {