diff options
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/kern_descrip.c | 8 | ||||
| -rw-r--r-- | sys/kern/vfs_syscalls.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 059a62120a0..1b79eefaf7d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.200 2020/02/26 13:54:52 visa Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.201 2020/03/13 10:07:01 anton Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -707,7 +707,7 @@ fdinsert(struct filedesc *fdp, int fd, int flags, struct file *fp) mtx_enter(&fhdlk); if ((fp->f_iflags & FIF_INSERTED) == 0) { - fp->f_iflags |= FIF_INSERTED; + atomic_setbits_int(&fp->f_iflags, FIF_INSERTED); if ((fq = fdp->fd_ofiles[0]) != NULL) { LIST_INSERT_AFTER(fq, fp, f_list); } else { @@ -1317,7 +1317,7 @@ sys_flock(struct proc *p, void *v, register_t *retval) lf.l_len = 0; if (how & LOCK_UN) { lf.l_type = F_UNLCK; - fp->f_iflags &= ~FIF_HASLOCK; + atomic_clearbits_int(&fp->f_iflags, FIF_HASLOCK); error = VOP_ADVLOCK(vp, (caddr_t)fp, F_UNLCK, &lf, F_FLOCK); goto out; } @@ -1329,7 +1329,7 @@ sys_flock(struct proc *p, void *v, register_t *retval) error = EINVAL; goto out; } - fp->f_iflags |= FIF_HASLOCK; + atomic_setbits_int(&fp->f_iflags, FIF_HASLOCK); if (how & LOCK_NB) error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, F_FLOCK); else diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 34dc786d60f..3a8c9208f9e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.342 2020/01/30 15:36:11 visa Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.343 2020/03/13 10:07:01 anton Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -1188,7 +1188,7 @@ doopenat(struct proc *p, int fd, const char *path, int oflags, mode_t mode, goto out; } vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - fp->f_iflags |= FIF_HASLOCK; + atomic_setbits_int(&fp->f_iflags, FIF_HASLOCK); } if (localtrunc) { if ((fp->f_flag & FWRITE) == 0) @@ -1457,7 +1457,7 @@ sys_fhopen(struct proc *p, void *v, register_t *retval) goto bad; } vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - fp->f_iflags |= FIF_HASLOCK; + atomic_setbits_int(&fp->f_iflags, FIF_HASLOCK); } VOP_UNLOCK(vp); *retval = indx; |
