]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commita987c7ca7fc9225a587b1dc59d7d4ad2d9e2e08e
tree8624277e806b28f2396fe6157b026f00a2089285
parent79040cad3f8235937e229f1b9401ba36dd5ad69b
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