Files
linux-apfs/drivers/md
Sebastian Riemer bbfa57c0f2 md: protect against crash upon fsync on ro array
If an fsync occurs on a read-only array, we need to send a
completion for the IO and may not increment the active IO count.
Otherwise, we hit a bug trace and can't stop the MD array anymore.

By advice of Christoph Hellwig we return success upon a flush
request but we return -EROFS for other writes.
We detect flush requests by checking if the bio has zero sectors.

This patch is suitable to any -stable kernel to which it applies.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: NeilBrown <neilb@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Riemer <sebastian.riemer@profitbricks.com>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-02-21 13:28:09 +11:00
..
2012-03-28 18:41:29 +01:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:36 +00:00
2012-12-21 20:23:41 +00:00
2012-07-30 17:25:16 -07:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:38 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:11:14 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:23:36 +00:00
2012-12-21 20:23:38 +00:00
2012-10-22 10:44:55 +11:00
2012-10-11 13:08:44 +11:00
2012-10-11 13:25:44 +11:00
2012-10-11 13:49:05 +11:00