diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2020-07-31 00:13:40 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2020-07-31 00:13:40 +0000 |
commit | d6a75d39e9ec2bcebeb3ee79e9b839b6af4a934e (patch) | |
tree | 35cb93c1a4fb981aaffc6d1fed6e66f5cd2cc7b7 /sys | |
parent | 59d13f615418fab119911e8df9799303cd6be222 (diff) | |
download | src-d6a75d39e9ec2bcebeb3ee79e9b839b6af4a934e.tar.gz src-d6a75d39e9ec2bcebeb3ee79e9b839b6af4a934e.zip |
getblk: Remove a non-sensical LK_NOWAIT | LK_SLEEPFAIL
No functional change.
LK_SLEEPFAIL implies a behavior that is only possible if the lock operation can
sleep. LK_NOWAIT prevents the lock operation from sleeping.
Discussed with: kib
Notes
Notes:
svn path=/head/; revision=363722
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index bf9f46b7a72a..524554cdd48f 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3887,10 +3887,8 @@ loop: * Buffer is in-core. If the buffer is not busy nor managed, * it must be on a queue. */ - lockflags = LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK; - - if ((flags & GB_LOCK_NOWAIT) != 0) - lockflags |= LK_NOWAIT; + lockflags = LK_EXCLUSIVE | LK_INTERLOCK | + ((flags & GB_LOCK_NOWAIT) ? LK_NOWAIT : LK_SLEEPFAIL); error = BUF_TIMELOCK(bp, lockflags, BO_LOCKPTR(bo), "getblk", slpflag, slptimeo); |