summaryrefslogtreecommitdiff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-09 20:20:14 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:20:14 -0500
commit34f9f437104b86f6ddfa2770e2cd852846385dc3 (patch)
tree6c78386b3db9dd47fd2b79efb4dcf8c1472de99e /drivers/net/tun.c
parent95dc19299f741c986227ec33e23cbf9b3321f812 (diff)
parent66e56cd46b93ef407c60adcac62cf33b06119d50 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' into 'net-next' to get the AF_PACKET bug fix that Daniel's direct transmit changes depend upon. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 6b0b2a057a47..3c5a8d8cde50 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1355,6 +1355,8 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
ret = tun_do_read(tun, tfile, 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;