]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix ocfs2_sync_file() if filesystem is readonly
authorYounger Liu <younger.liucn@gmail.com>
Mon, 10 Feb 2014 22:25:44 +0000 (14:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Feb 2014 00:01:42 +0000 (16:01 -0800)
commit1a5827352d5bf3237286f9847c9624fc9f517c0b
tree8624277e806b28f2396fe6157b026f00a2089285
parentcc2ba55f435b5987f1dfff64f528a097b3ff1dd0
ocfs2: fix ocfs2_sync_file() if filesystem is readonly

If filesystem is readonly, there is no need to flush drive's caches or
force any uncommitted transactions.

[akpm@linux-foundation.org: return -EROFS, not 0]
Signed-off-by: Younger Liu <younger.liucn@gmail.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/file.c