Konstantin Belousov cc3d8c35f5 There are several code sequences like
vfs_busy(mp);
      vfs_write_suspend(mp);
which are problematic if other thread starts unmount between two
calls.  The unmount starts a write, while vfs_write_suspend() drain
writers.  On the other hand, unmount drains busy references, causing
the deadlock.

Add a flag argument to vfs_write_suspend and require the callers of it
to specify VS_SKIP_UNMOUNT flag, when the call is performed not in the
mount path, i.e. the covered vnode is not locked.  The suspension is
not attempted if VS_SKIP_UNMOUNT is specified and unmount is in
progress.

Reported and tested by:	Andreas Longwitz <longwitz@incore.de>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2013-07-09 20:49:32 +00:00
..
2013-05-01 22:42:42 +00:00
2013-04-03 22:24:36 +00:00
2013-06-08 13:30:13 +00:00
2013-03-04 12:20:48 +00:00
2013-03-02 00:53:12 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2012-03-28 20:58:30 +00:00
2012-11-14 10:33:12 +00:00
2013-04-05 20:24:51 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
2012-01-26 16:35:09 +00:00
2012-09-14 21:28:56 +00:00
2013-06-29 04:35:04 +00:00
2013-05-01 22:42:42 +00:00
2013-06-08 13:30:13 +00:00
2013-06-08 13:30:13 +00:00
2012-01-02 12:12:10 +00:00
2012-10-25 09:05:21 +00:00
2013-03-02 00:53:12 +00:00
2013-06-29 05:05:57 +00:00