]> err.no Git - linux-2.6/commit
[PATCH] direct-io: sync and invalidate file region when falling back to buffered...
authorJeff Moyer <jmoyer@redhat.com>
Fri, 20 Oct 2006 06:28:13 +0000 (23:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 20 Oct 2006 17:26:35 +0000 (10:26 -0700)
commitfb5527e68d495650a7658fec9a7246bf922db212
treedc0c993c3f07ddf1d1cf02a725ac3348f638d7bc
parente8e82b76e0312827f5ae04b573a05b02854a447e
[PATCH] direct-io: sync and invalidate file region when falling back to buffered write

When direct-io falls back to buffered write, it will just leave the dirty data
floating about in pagecache, pending regular writeback.

But normal direct-io semantics are that IO is synchronous, and that it leaves
no pagecache behind.

So change the fallback-to-buffered-write code to sync the file region and to
then strip away the pagecache, just as a regular direct-io write would do.

Acked-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/filemap.c