]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: lustre: Replace LPROCFS_CLIMP_EXIT with up_read
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Thu, 29 Oct 2015 00:30:43 +0000 (17:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
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>
drivers/staging/lustre/lustre/include/lprocfs_status.h
drivers/staging/lustre/lustre/mgc/mgc_request.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c

index 9e654b218ca358824857226d985e76b35c89421e..f18c0c75ef1ec44ca1f9b7e8bced05a441ca6b95 100644 (file)
@@ -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,
index 5f53f3b7cefff97599aae54f85ba2111cba24017..2d6de6c19b9f133f8c35f08dc34707aebe24b00f 100644 (file)
@@ -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;
 }
 
index 333ac7d269b7ed3ae5667a0c8eccc5bc4894bba4..2de3c1b6fa49f2081636fc3a7eb1e38a9b7748f2 100644 (file)
@@ -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);
index afab0dee7a5ce0603bb26b1636c0dbb58b3aae66..2aecab21e3e1aaa1a63c3fb7e053934ded337ee4 100644 (file)
@@ -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;