Skip to contentSkip to conversation

macvtap: update file current position

PATCH Superseded Zhi Yong Wu 1 participant 2 messages Dec 6, 2013

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 macvtap: update file current position

From: Zhi Yong Wu <[email protected]>

---
 drivers/net/macvtap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/macvtap.c +2 -0
index 9093004..957cc5c 100644
@@ -876,6 +876,8 @@ static ssize_t macvtap_aio_read(struct kiocb *iocb, const struct iovec *iv,
 
 	ret = macvtap_do_read(q, iocb, iv, len, file->f_flags & O_NONBLOCK);
 	ret = min_t(ssize_t, ret, len); /* XXX copied from tun.c. Why? */
+	if (ret > 0)
+		iocb->ki_pos = ret;
 out:
 	return ret;
 }
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH 2/2 tun: update file current position

From: Zhi Yong Wu <[email protected]>

---
 drivers/net/tun.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/tun.c +2 -0
index 782e38b..e26cbea 100644
@@ -1356,6 +1356,8 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
 	ret = tun_do_read(tun, tfile, iocb, iv, len,
 			  file->f_flags & O_NONBLOCK);
 	ret = min_t(ssize_t, ret, len);
+	if (ret > 0)
+		iocb->ki_pos = ret;
 out:
 	tun_put(tun);
 	return ret;
Signature · 1 line
1.7.6.5