ocfs2: Avoid direct write if we fall back to buffered I/O
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 <9b77a5d8582b7e77068728f7ead96b9ce8caa9be@novell.com>
Acked-by: Mark Fasheh <8f0bc92cac940f3e83deb53ced7a1f201bce5732@suse.com>
Signed-off-by: Joel Becker <823d0e2e55da83c1616b20ae9a15f9456fa076e5@oracle.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs