Re: 2.6.9-mm1

From: Andrew Morton
Date: Tue Oct 26 2004 - 15:26:31 EST


Alexander Nyberg <alexn@xxxxxxxxx> wrote:
>
> On Fri, 2004-10-22 at 12:20, Andrew Morton wrote:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9/2.6.9-mm1/
> >
> > - Lots of new patches.
>
> Two different boxes, hits when running the ltp tests'./runltp -x 4'.

Yup, sorry.


From: Jens Axboe <axboe@xxxxxxx>

->head and ->tail were not initialized in the cleanup path, I'm guessing
this happens if we adjust the read to zero. Seems best to simply check for
that condition and bail early, instead of initing ->head and tail earlier
and go through the whole path.


Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

25-akpm/fs/direct-io.c | 2 ++
1 files changed, 2 insertions(+)

diff -puN fs/direct-io.c~dio-handle-eof-fix fs/direct-io.c
--- 25/fs/direct-io.c~dio-handle-eof-fix 2004-10-26 00:49:40.363376432 -0700
+++ 25-akpm/fs/direct-io.c 2004-10-26 00:49:40.367375824 -0700
@@ -987,6 +987,8 @@ direct_io_worker(int rw, struct kiocb *i
isize = i_size_read(inode);
if (bytes_todo > (isize - offset))
bytes_todo = isize - offset;
+ if (!bytes_todo)
+ return 0;

for (seg = 0; seg < nr_segs && bytes_todo; seg++) {
user_addr = (unsigned long)iov[seg].iov_base;
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/