Alexander Stein 70d5098a4b mtd: mtdblock: call mtd_sync() only if opened for write
Because it is useless to call it if the device is opened in R/O mode, and also
harmful: on CFI NOR flash it may block for long time waiting for erase
operations to complete is another partition with a R/W file-system on this
chip.

Artem Bityutskiy: write commit message, amend the patch to match the latest
tree (we use mtd_sync(), not mtd->sync() nowadays).

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:11 +01:00
..
2012-01-09 18:25:19 +00:00
2012-01-09 18:25:19 +00:00
2012-01-09 18:26:21 +00:00
2012-01-30 14:23:07 +00:00
2011-09-11 15:02:13 +03:00
2012-01-12 20:13:11 -08:00
2011-09-11 15:02:14 +03:00
2012-01-09 18:26:21 +00:00
2012-01-09 18:26:08 +00:00