Anton Altaparmakov bfab36e816 NTFS: Fix a mount time deadlock.
Big thanks go to Mathias Kolehmainen for reporting the bug, providing
debug output and testing the patches I sent him to get it working.

The fix was to stop calling ntfs_attr_set() at mount time as that causes
balance_dirty_pages_ratelimited() to be called which on systems with
little memory actually tries to go and balance the dirty pages which tries
to take the s_umount semaphore but because we are still in fill_super()
across which the VFS holds s_umount for writing this results in a
deadlock.

We now do the dirty work by hand by submitting individual buffers.  This
has the annoying "feature" that mounting can take a few seconds if the
journal is large as we have clear it all.  One day someone should improve
on this by deferring the journal clearing to a helper kernel thread so it
can be done in the background but I don't have time for this at the moment
and the current solution works fine so I am leaving it like this for now.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-12 09:16:30 -07:00
..
2006-11-30 04:58:40 +01:00
2005-11-22 09:14:30 -08:00
2006-10-03 22:54:15 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-10-03 22:47:42 +02:00
2005-04-16 15:20:36 -07:00
2006-10-03 22:52:05 +02:00
2006-06-26 09:58:20 -07:00
2006-12-30 10:56:45 -08:00
2006-04-25 15:44:04 -04:00
2005-04-16 15:20:36 -07:00
2007-07-31 15:39:38 -07:00
2007-05-09 08:58:15 +02:00
2006-03-22 00:13:35 +01:00
2007-07-19 10:04:41 -07:00
2005-04-16 15:20:36 -07:00
2007-10-12 09:16:30 -07:00
2007-09-11 11:38:25 -07:00
2007-05-09 08:58:15 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-11-30 04:58:40 +01:00
2007-02-17 19:23:03 +01:00
2006-10-03 22:47:42 +02:00
2006-12-07 08:39:44 -08:00
2007-02-12 09:48:40 -08:00
2005-11-03 13:46:43 +11:00
2007-05-09 08:58:15 +02:00