Correct comment typos.
Correct a bug that prevented deadlkres from (almost) ever firing.

deadlkres was using a reversed test to check whether ticks had rolled over.
This meant that deadlkres could only fire after ticks had rolled over.
This test was actually unnecessary as deadlkres only ever took the
difference of ticks values which is safe even in the presence of ticks
rollover.  Remove the tests entirely.  Now deadlkres will properly fire
after a lock has been held after the timeout period.

MFC after:	1 month
Fix build with gcc.
Make a pass over this page to correct and clarify a few things as well as
some general word-smithing.
- Don't claim that adaptive mutexes have a timeout (they don't).
- Don't treat pool mutexes as a separate primitive in a few places.
- Describe sleepable read-mostly locks as a separate lock type and add
  them to the various tables.
- Don't claim that sx locks are less efficient.  That hasn't been true in
  a few years now.
- Describe lockmanager locks next to sx locks since they are very similar
  in terms of rules, etc., and so that all the lock primitives are
  grouped together before the non-lock primitives.
- Similarly, move the section on Giant after the description of all the
  non-lock primitives to preserve grouping.
- Condition variables work on several types of locks, not just mutexes.
- Add a bit of language to compare/contrast condition variables with
  sleep/wakeup.
- Add a note about why pause(9) is unique.
- Add some language to define bounded vs unbounded sleeps and explain
  why they are treated separately (bounded sleeps only need CPU time
  to make forward progress).
- Don't state that using mtx_sleep() is a bad idea.  It is in fact rather
  necessary.
- Rework the interaction table a bit.  First, it did not include really
  include sleepable rmlocks and it left out lockmgr entirely.  To get
  things to fit, combine similar lock types into the same column / row,
  and explicitly state what "sleep" means.  The notes about recursion
  and lock order were also a bit banal (lock order is always important,
  not just in the few places annotated here), so remove them.  In
  particular, the lock order note would need to be on just about every
  cell.  If we want to document recursion I think a better approach
  would be a separate table summarizing the recursion rules for each
  lock as having too many notes clutters the table.
- Tweak the tables to use less indentation so everything still fits with
  the added columns.
- Correct a few cells in the context mode table.
- Use mdoc markup instead of explicit markup in a few places.

Requested by:	julian
MFC after:	2 weeks
sysconf(3) returns a long, not an int.
Rework r252313:

The filedesc lock may not be dropped unconditionally before exporting
fd to sbuf: fd might go away during execution.  While it is ok for
DTYPE_VNODE and DTYPE_FIFO because the export is from a vrefed vnode
here, for other types it is unsafe.

Instead, drop the lock in export_fd_to_sb(), after preparing data in
memory and before writing to sbuf.

Spotted by:	mjg
Suggested by:	kib
Review by:	kib
MFC after:	1 week
Remove duplicate NULL check in kern_proc_filedesc_out.
No functional changes.

MFC after:	1 week
Plug a couple of leakages in smbfs_lookup().
Garbage collect an useless check. smp should be never NULL.
Remove a reference to LK_DRAIN now that lockmgr(9) is gone from this
piece of code.

Reported by:	attilio
Properly use v_data field. This magically worked (even if wrong) until
now because v_data is the first field of the structure, but it's not
something we should rely on.
- Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.
Correct the comment above _sleep() function which still mentions 'timo'
instead of 'sbintime_t'.

Reported by:	kan
Remove a spurious keg lock acquisition.
sh: Do not close(-1) if pipe() fails.
Don't attempt to do DHCP on certain interfaces, similar to what's done for
ipv6_autoconfif() in r212577.

MFC after:	1 week
Add identification for Cortex-A15 (R0) cores.

Submitted by:	Ruslan Bukin <br@bsdpad.com>
Bump max number of IRQs for Cortex-Ax family to cover Exynos5 requirement.

Submitted by:	Ruslan Bukin <br@bsdpad.com>
sysconf(3) returns a long, not an int.
Bring some updates from ufs_lookup to ext2fs.

r156418:

Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspended
file systems.  This could cause deadlocks when creating snapshots.
(We can't do snapshots on ext2fs but it is useful to keep things in sync).

r183079:

- Only set i_offset in the parent directory's i-node during a lookup for
  non-LOOKUP operations.
- Relax a VOP assertion for a DELETE lookup.

r187528:

Move the code from ufs_lookup.c used to do dotdot lookup, into
the helper function. It is supposed to be useful for any filesystem
that has to unlock dvp to walk to the ".." entry in lookup routine.

MFC after:	5 days