From 066f3792f6ab5c7485e9c8375b15e5d7bc8e6af3 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 30 Sep 2005 11:58:56 -0700 Subject: [PATCH] --- yaml --- r: 9505 b: refs/heads/master c: 353fb07e2043d2df12dddf4e2c39552d0ab9b026 h: refs/heads/master i: 9503: 9f9b72820f8c75f47e0f15ee7189ac21f036ca3e v: v3 --- [refs] | 2 +- trunk/fs/aio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 41e36f6f5e51..8b8e2653a321 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 897f15fb587fd2772b9e7ff6ec0265057f3c3975 +refs/heads/master: 353fb07e2043d2df12dddf4e2c39552d0ab9b026 diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 9edc0e4a1219..d6b1551342b7 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -1347,7 +1347,7 @@ static ssize_t aio_pread(struct kiocb *iocb) * regular files we retry till we complete the entire read or * find that we can't read any more data (e.g short reads). */ - } while (ret > 0 && + } while (ret > 0 && iocb->ki_left > 0 && !S_ISFIFO(inode->i_mode) && !S_ISSOCK(inode->i_mode)); /* This means we must have transferred all that we could */ @@ -1371,7 +1371,7 @@ static ssize_t aio_pwrite(struct kiocb *iocb) iocb->ki_buf += ret; iocb->ki_left -= ret; } - } while (ret > 0); + } while (ret > 0 && iocb->ki_left > 0); if ((ret == 0) || (iocb->ki_left == 0)) ret = iocb->ki_nbytes - iocb->ki_left;