]> git.hungrycats.org Git - linux/commit
[PATCH] direct-io hole fix
authorAndrew Morton <akpm@osdl.org>
Thu, 3 Jun 2004 01:02:02 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 01:02:02 +0000 (18:02 -0700)
commit50ce176cea9518621b7c836af0a419d3a0c5e9e7
treeca3a441dda2814994da0b4aeef925247bb1af806
parentdde27822586dd7a89c91c66d11878f8e19e6b823
[PATCH] direct-io hole fix

From: Chris Mason <mason@suse.com>

When filling holes via DIRECT_IO, we fall back to normal buffered io.  For
this to work properly, the direct io funcs have to return a value of zero to
the file write functions, so the file write functions know where to start
writing.

In some cases, dio->result was getting returned by direct_io_worker, and that
wasn't always zero, causing some data not to be written.

From: <akpm@osdl.org>:

- Simplify things by setting `ret' later on, fix up subsequent damage to the
  dio_complete() args.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/direct-io.c