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
This commit is contained in:
Conrad Meyer 2020-07-31 00:13:40 +00:00
parent 59d13f6154
commit d6a75d39e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363722

View File

@ -3887,10 +3887,8 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag,
* 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);