ocfs2: Avoid direct write if we fall back to buffered I/O
authorLi Dongyang <lidongyang@novell.com>
Sat, 17 Apr 2010 09:49:10 +0000 (17:49 +0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 30 Apr 2010 20:45:13 +0000 (13:45 -0700)
commit6b933c8e6f1a2f3118082c455eef25f9b1ac7b45
treebf31f4067a95aa23a354edfa89810c9eaaf71aaa
parentf9221fd80343285514568da6c5dbda0f87109de8
ocfs2: Avoid direct write if we fall back to buffered I/O

when we fall back to buffered write from direct write, we call
__generic_file_aio_write() but that will end up doing direct write
even we are only prepared to do buffered write because the file
has the O_DIRECT flag set. This is a fix for
https://bugzilla.novell.com/show_bug.cgi?id=591039
revised with Joel's comments.

Signed-off-by: Li Dongyang <lidongyang@novell.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/file.c