Author: cem
Date: Fri Jul 31 00:13:40 2020
New Revision: 363722
URL: https://svnweb.freebsd.org/changeset/base/363722

Log:
  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

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c     Fri Jul 31 00:07:01 2020        (r363721)
+++ head/sys/kern/vfs_bio.c     Fri Jul 31 00:13:40 2020        (r363722)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to