Index: nfs_lock.h =================================================================== RCS file: /data/ncvs/src/sys/nfsclient/nfs_lock.h,v retrieving revision 1.5 diff -u -r1.5 nfs_lock.h --- nfs_lock.h 15 Aug 2002 21:52:22 -0000 1.5 +++ nfs_lock.h 18 May 2003 23:21:56 -0000 @@ -68,6 +68,7 @@ struct lockd_msg_ident lm_msg_ident; /* originator of the message */ struct flock lm_fl; /* The lock request. */ int lm_wait; /* The F_WAIT flag. */ + int lm_abort; /* Abort this attempted. */ int lm_getlk; /* is this a F_GETLK request */ struct sockaddr_storage lm_addr; /* The address. */ int lm_nfsv3; /* If NFS version 3. */ Index: nfs_lock.c =================================================================== RCS file: /data/ncvs/src/sys/nfsclient/nfs_lock.c,v retrieving revision 1.35 diff -u -r1.35 nfs_lock.c --- nfs_lock.c 1 May 2003 16:59:23 -0000 1.35 +++ nfs_lock.c 18 May 2003 23:26:36 -0000 @@ -122,6 +122,7 @@ msg.lm_fl = *fl; msg.lm_wait = ap->a_flags & F_WAIT; + msg.lm_abort = 0; msg.lm_getlk = ap->a_op == F_GETLK; bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr, min(sizeof msg.lm_addr, VFSTONFS(vp->v_mount)->nm_nam->sa_len)); @@ -201,6 +202,18 @@ */ ioflg |= IO_NDELAY; continue; + } else if (error = EINTR) { + /* + * User got bored of waiting or some other + * signal was delivered. We send a lock + * abort message to rpc.lockd and continue + * on our merry way. + */ + msg.lm_abort = 1; + error = vn_rdwr(UIO_WRITE, wvp, (caddr_t)&msg, + sizeof(msg), 0, UIO_SYSSPACE, ioflg, + thread0.td_ucred, NOCRED, NULL, td); + break; } break;