From: Alexander Stein Date: Tue, 10 Jan 2012 12:26:58 +0000 (+0100) Subject: mtd: mtdblock: call mtd_sync() only if opened for write X-Git-Tag: v3.4-rc1~16^2~117 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d5098a4b1551864dd7df43f67b7f606a1a6438;p=pandora-kernel.git 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed