aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/os/freebsd/spl/sys/sig.h8
-rw-r--r--include/os/linux/spl/sys/signal.h5
-rw-r--r--include/sys/zfs_context.h3
-rw-r--r--module/os/linux/spl/spl-thread.c16
-rw-r--r--module/zfs/dmu_diff.c2
-rw-r--r--module/zfs/dmu_objset.c2
-rw-r--r--module/zfs/dmu_recv.c2
-rw-r--r--module/zfs/dmu_redact.c2
-rw-r--r--module/zfs/dmu_send.c2
-rw-r--r--module/zfs/zcp.c3
-rw-r--r--module/zfs/zfs_ioctl.c2
-rw-r--r--module/zfs/zfs_vnops.c2
12 files changed, 14 insertions, 35 deletions
diff --git a/include/os/freebsd/spl/sys/sig.h b/include/os/freebsd/spl/sys/sig.h
index a4d440d38..17fc65cbe 100644
--- a/include/os/freebsd/spl/sys/sig.h
+++ b/include/os/freebsd/spl/sys/sig.h
@@ -39,20 +39,14 @@
#include <sys/signalvar.h>
#include <sys/debug.h>
-#define FORREAL 0
-#define JUSTLOOKING 1
-
static __inline int
-issig(int why)
+issig(void)
{
struct thread *td = curthread;
struct proc *p;
int sig;
- ASSERT(why == FORREAL || why == JUSTLOOKING);
if (SIGPENDING(td)) {
- if (why == JUSTLOOKING)
- return (1);
p = td->td_proc;
PROC_LOCK(p);
mtx_lock(&p->p_sigacts->ps_mtx);
diff --git a/include/os/linux/spl/sys/signal.h b/include/os/linux/spl/sys/signal.h
index 6b538c896..cb4b33261 100644
--- a/include/os/linux/spl/sys/signal.h
+++ b/include/os/linux/spl/sys/signal.h
@@ -30,9 +30,6 @@
#include <linux/sched/signal.h>
#endif
-#define FORREAL 0 /* Usual side-effects */
-#define JUSTLOOKING 1 /* Don't stop the process */
-
-extern int issig(int why);
+extern int issig(void);
#endif /* SPL_SIGNAL_H */
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 8f264b50e..e4711ce41 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -249,8 +249,7 @@ extern struct proc p0;
extern kthread_t *zk_thread_create(const char *name, void (*func)(void *),
void *arg, size_t stksize, int state);
-#define issig(why) (FALSE)
-#define ISSIG(thr, why) (FALSE)
+#define issig() (FALSE)
#define KPREEMPT_SYNC (-1)
diff --git a/module/os/linux/spl/spl-thread.c b/module/os/linux/spl/spl-thread.c
index ee3eb4690..dbb8eefa7 100644
--- a/module/os/linux/spl/spl-thread.c
+++ b/module/os/linux/spl/spl-thread.c
@@ -152,26 +152,16 @@ spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...)
EXPORT_SYMBOL(spl_kthread_create);
/*
- * The "why" argument indicates the allowable side-effects of the call:
- *
- * FORREAL: Extract the next pending signal from p_sig into p_cursig;
- * stop the process if a stop has been requested or if a traced signal
- * is pending.
- *
- * JUSTLOOKING: Don't stop the process, just indicate whether or not
- * a signal might be pending (FORREAL is needed to tell for sure).
+ * Extract the next pending signal from p_sig into p_cursig; stop the process
+ * if a stop has been requested or if a traced signal is pending.
*/
int
-issig(int why)
+issig(void)
{
- ASSERT(why == FORREAL || why == JUSTLOOKING);
if (!signal_pending(current))
return (0);
- if (why != FORREAL)
- return (1);
-
struct task_struct *task = current;
spl_kernel_siginfo_t __info;
sigset_t set;
diff --git a/module/zfs/dmu_diff.c b/module/zfs/dmu_diff.c
index a2b1a27c8..0def0956b 100644
--- a/module/zfs/dmu_diff.c
+++ b/module/zfs/dmu_diff.c
@@ -116,7 +116,7 @@ diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
dmu_diffarg_t *da = arg;
int err = 0;
- if (issig(JUSTLOOKING) && issig(FORREAL))
+ if (issig())
return (SET_ERROR(EINTR));
if (zb->zb_level == ZB_DNODE_LEVEL ||
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index f1818ae15..8f4fefa4f 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -2437,7 +2437,7 @@ dmu_objset_space_upgrade(objset_t *os)
if (err != 0)
return (err);
- if (issig(JUSTLOOKING) && issig(FORREAL))
+ if (issig())
return (SET_ERROR(EINTR));
objerr = dmu_bonus_hold(os, obj, FTAG, &db);
diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c
index 680aed451..0119191d7 100644
--- a/module/zfs/dmu_recv.c
+++ b/module/zfs/dmu_recv.c
@@ -3389,7 +3389,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, offset_t *voffp)
* stream, then we free drc->drc_rrd and exit.
*/
while (rwa->err == 0) {
- if (issig(JUSTLOOKING) && issig(FORREAL)) {
+ if (issig()) {
err = SET_ERROR(EINTR);
break;
}
diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c
index 5ac14edfc..1feba0ba8 100644
--- a/module/zfs/dmu_redact.c
+++ b/module/zfs/dmu_redact.c
@@ -912,7 +912,7 @@ perform_redaction(objset_t *os, redaction_list_t *rl,
object = prev_obj;
}
while (err == 0 && object <= rec->end_object) {
- if (issig(JUSTLOOKING) && issig(FORREAL)) {
+ if (issig()) {
err = EINTR;
break;
}
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
index b6cc2f0a5..cb2b62fed 100644
--- a/module/zfs/dmu_send.c
+++ b/module/zfs/dmu_send.c
@@ -2552,7 +2552,7 @@ dmu_send_impl(struct dmu_send_params *dspp)
while (err == 0 && !range->eos_marker) {
err = do_dump(&dsc, range);
range = get_next_range(&srt_arg->q, range);
- if (issig(JUSTLOOKING) && issig(FORREAL))
+ if (issig())
err = SET_ERROR(EINTR);
}
diff --git a/module/zfs/zcp.c b/module/zfs/zcp.c
index 959404f66..7c279162a 100644
--- a/module/zfs/zcp.c
+++ b/module/zfs/zcp.c
@@ -780,8 +780,7 @@ zcp_lua_counthook(lua_State *state, lua_Debug *ar)
* Check if we were canceled while waiting for the
* txg to sync or from our open context thread
*/
- if (ri->zri_canceled ||
- (!ri->zri_sync && issig(JUSTLOOKING) && issig(FORREAL))) {
+ if (ri->zri_canceled || (!ri->zri_sync && issig())) {
ri->zri_canceled = B_TRUE;
(void) lua_pushstring(state, "Channel program was canceled.");
(void) lua_error(state);
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index b720b4f22..7b527eb75 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -2336,7 +2336,7 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc)
}
while (error == 0) {
- if (issig(JUSTLOOKING) && issig(FORREAL)) {
+ if (issig()) {
error = SET_ERROR(EINTR);
break;
}
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
index b222a6f88..f3db953ea 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -1413,7 +1413,7 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
len -= size;
done += size;
- if (issig(JUSTLOOKING) && issig(FORREAL)) {
+ if (issig()) {
error = SET_ERROR(EINTR);
break;
}