patch-2.1.68 linux/fs/lockd/svc.c
Next file: linux/fs/ncpfs/sock.c
Previous file: linux/fs/lockd/clntproc.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Sun Nov 30 10:59:02 1997
- Orig file:
v2.1.67/linux/fs/lockd/svc.c
- Orig date:
Wed Oct 15 16:04:23 1997
diff -u --recursive --new-file v2.1.67/linux/fs/lockd/svc.c linux/fs/lockd/svc.c
@@ -37,8 +37,7 @@
#define NLMDBG_FACILITY NLMDBG_SVC
#define LOCKD_BUFSIZE (1024 + NLMSSVC_XDRSIZE)
-#define BLOCKABLE_SIGS (~(_S(SIGKILL) | _S(SIGSTOP)))
-#define _S(sig) (1 << ((sig) - 1))
+#define BLOCKABLE_SIGS (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
extern struct svc_program nlmsvc_program;
struct nlmsvc_binding * nlmsvc_ops = NULL;
@@ -65,7 +64,6 @@
lockd(struct svc_rqst *rqstp)
{
struct svc_serv *serv = rqstp->rq_server;
- sigset_t oldsigmask;
int err = 0;
/* Lock module and set up kernel thread */
@@ -118,8 +116,11 @@
*/
while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid)
{
- if (signalled())
- current->signal = 0;
+ if (signalled()) {
+ spin_lock_irq(¤t->sigmask_lock);
+ flush_signals(current);
+ spin_unlock_irq(¤t->sigmask_lock);
+ }
/*
* Retry any blocked locks that have been notified by
@@ -162,10 +163,17 @@
}
/* Process request with all signals blocked. */
- oldsigmask = current->blocked;
- current->blocked = BLOCKABLE_SIGS;
+ spin_lock_irq(¤t->sigmask_lock);
+ siginitsetinv(¤t->blocked, ~BLOCKABLE_SIGS);
+ recalc_sigpending(current);
+ spin_unlock_irq(¤t->sigmask_lock);
+
svc_process(serv, rqstp);
- current->blocked = oldsigmask;
+
+ spin_lock_irq(¤t->sigmask_lock);
+ sigemptyset(¤t->blocked);
+ recalc_sigpending(current);
+ spin_unlock_irq(¤t->sigmask_lock);
/* Unlock export hash tables */
if (nlmsvc_ops)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov