staging: lustre: libcfs: remove cfs_signal_pending wrapper
authorJames Simmons <jsimmons@infradead.org>
Mon, 28 Mar 2016 00:26:22 +0000 (20:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Mar 2016 19:10:20 +0000 (12:10 -0700)
Use signal_pending() directly instead of a one line function
wrapper.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13874
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/ptlrpc/client.c

index 332394cca741dbd4d19c1a082a439a110b9c45a1..9158c61f68511b0884cb9f4d2626ec3f2486f265 100644 (file)
@@ -66,7 +66,6 @@ sigset_t cfs_block_allsigs(void);
 sigset_t cfs_block_sigs(unsigned long sigs);
 sigset_t cfs_block_sigsinv(unsigned long sigs);
 void cfs_restore_sigs(sigset_t);
-int cfs_signal_pending(void);
 void cfs_clear_sigpending(void);
 
 /*
index 89084460231a420fce32080bcb98029cf1558634..7e5ef0a20f93870a5629099ef2b213e1e4482fa9 100644 (file)
@@ -128,13 +128,6 @@ cfs_restore_sigs(sigset_t old)
 }
 EXPORT_SYMBOL(cfs_restore_sigs);
 
-int
-cfs_signal_pending(void)
-{
-       return signal_pending(current);
-}
-EXPORT_SYMBOL(cfs_signal_pending);
-
 void
 cfs_clear_sigpending(void)
 {
index f2223d55850adbf6d72e596cf04200858c130afe..c5713d74486aef29c81b07cf5d34289a4709d93b 100644 (file)
@@ -578,7 +578,7 @@ do {                                                                           \
                                                                               \
                if (condition)                                           \
                        break;                                           \
-               if (cfs_signal_pending()) {                                 \
+               if (signal_pending(current)) {                              \
                        if (info->lwi_on_signal &&                   \
                            (__timeout == 0 || __allow_intr)) {         \
                                if (info->lwi_on_signal != LWI_ON_SIGNAL_NOOP) \
index aec644eb4db950e03a8a4eb42684b9f2a585b12f..f952c1cb07612e0faf8c1c6d6e2070853cf94102 100644 (file)
@@ -951,7 +951,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
                result = -ERESTARTSYS;
                if (likely(!OBD_FAIL_CHECK(OBD_FAIL_LOCK_STATE_WAIT_INTR))) {
                        schedule();
-                       if (!cfs_signal_pending())
+                       if (!signal_pending(current))
                                result = 0;
                }
 
index 1b7673eec4d710e853b79bbb82a5d6aa4cd373be..32a7c8710119d99945327a09d03e8fc21792b6b5 100644 (file)
@@ -2087,7 +2087,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set)
                CDEBUG(D_RPCTRACE, "set %p going to sleep for %d seconds\n",
                       set, timeout);
 
-               if (timeout == 0 && !cfs_signal_pending())
+               if (timeout == 0 && !signal_pending(current))
                        /*
                         * No requests are in-flight (ether timed out
                         * or delayed), so we can allow interrupts.
@@ -2114,7 +2114,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set)
                 * it being ignored forever
                 */
                if (rc == -ETIMEDOUT && !lwi.lwi_allow_intr &&
-                   cfs_signal_pending()) {
+                   signal_pending(current)) {
                        sigset_t blocked_sigs =
                                           cfs_block_sigsinv(LUSTRE_FATAL_SIGS);
 
@@ -2124,7 +2124,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set)
                         * important signals since ptlrpc set is not easily
                         * reentrant from userspace again
                         */
-                       if (cfs_signal_pending())
+                       if (signal_pending(current))
                                ptlrpc_interrupted_set(set);
                        cfs_restore_sigs(blocked_sigs);
                }