[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150316161519.16418.63051.stgit@tstruk-mobl1>
Date: Mon, 16 Mar 2015 09:15:19 -0700
From: Tadeusz Struk <tadeusz.struk@...el.com>
To: davem@...emloft.net
Cc: linux-aio@...ck.org, herbert@...dor.apana.org.au,
netdev@...r.kernel.org, ying.xue@...driver.com, bcrl@...ck.org,
viro@...IV.linux.org.uk, linux-fsdevel@...r.kernel.org, hch@....de,
linux-crypto@...r.kernel.org
Subject: [PATCH v2 net-next 2/4] aio: prefer aio_op op over iter_op
AIO interface should prefer AIO operations over iter_op
Signed-off-by: Tadeusz Struk <tadeusz.struk@...el.com>
---
fs/aio.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index f8e52a1..389f4dd 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1449,11 +1449,15 @@ rw_common:
if (rw == WRITE)
file_start_write(file);
- if (iter_op) {
+ if (rw_op) {
+ ret = rw_op(req, iovec, nr_segs, req->ki_pos);
+ } else if (iter_op) {
iov_iter_init(&iter, rw, iovec, nr_segs, req->ki_nbytes);
ret = iter_op(req, &iter);
} else {
- ret = rw_op(req, iovec, nr_segs, req->ki_pos);
+ if (iovec != inline_vecs)
+ kfree(iovec);
+ return -EINVAL;
}
if (rw == WRITE)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists