From: Tadeusz Struk <tadeusz.struk@intel.com>
To: davem@davemloft.net
Cc: linux-aio@kvack.org, herbert@gondor.apana.org.au,
netdev@vger.kernel.org, ying.xue@windriver.com, bcrl@kvack.org,
viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
hch@lst.de, linux-crypto@vger.kernel.org
Subject: [PATCH v2 net-next 2/4] aio: prefer aio_op op over iter_op
Date: Mon, 16 Mar 2015 09:15:19 -0700 [thread overview]
Message-ID: <20150316161519.16418.63051.stgit@tstruk-mobl1> (raw)
In-Reply-To: <20150316161508.16418.23674.stgit@tstruk-mobl1>
AIO interface should prefer AIO operations over iter_op
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.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, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
next prev parent reply other threads:[~2015-03-16 16:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 16:15 [PATCH v2 net-next 0/4] Add support for async socket operations Tadeusz Struk
2015-03-16 16:15 ` [PATCH v2 net-next 1/4] net: socket: add support for async operations Tadeusz Struk
2015-03-19 16:20 ` Al Viro
2015-03-19 17:43 ` Tadeusz Struk
2015-03-19 18:13 ` Al Viro
2015-03-16 16:15 ` Tadeusz Struk [this message]
2015-03-19 16:22 ` [PATCH v2 net-next 2/4] aio: prefer aio_op op over iter_op Al Viro
2015-03-16 16:15 ` [PATCH v2 net-next 3/4] crypto: af_alg - Allow to link sgl Tadeusz Struk
2015-03-16 16:15 ` [PATCH v2 net-next 4/4] crypto: algif - change algif_skcipher to be asynchronous Tadeusz Struk
2015-03-18 20:59 ` [PATCH v2 net-next 0/4] Add support for async socket operations Tadeusz Struk
2015-03-18 23:29 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150316161519.16418.63051.stgit@tstruk-mobl1 \
--to=tadeusz.struk@intel.com \
--cc=bcrl@kvack.org \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-aio@kvack.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).