aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 18:31:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 18:31:03 -0400
commitca2ec32658db160745990496f0f4580056a5dc9f (patch)
treed211f239219c85214da46dc1cbad4184a81d0248 /net
parent6c8a53c9e6a151fffb07f8b4c34bd1e33dddd467 (diff)
parentfdc81f45e9f57858da6351836507fbcf1b7583ee (diff)
Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs update from Al Viro: "Part one: - struct filename-related cleanups - saner iov_iter_init() replacements (and switching the syscalls to use of those) - ntfs switch to ->write_iter() (Anton) - aio cleanups and splitting iocb into common and async parts (Christoph) - assorted fixes (me, bfields, Andrew Elble) There's a lot more, including the completion of switchover to ->{read,write}_iter(), d_inode/d_backing_inode annotations, f_flags race fixes, etc, but that goes after #for-davem merge. David has pulled it, and once it's in I'll send the next vfs pull request" * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (35 commits) sg_start_req(): use import_iovec() sg_start_req(): make sure that there's not too many elements in iovec blk_rq_map_user(): use import_single_range() sg_io(): use import_iovec() process_vm_access: switch to {compat_,}import_iovec() switch keyctl_instantiate_key_common() to iov_iter switch {compat_,}do_readv_writev() to {compat_,}import_iovec() aio_setup_vectored_rw(): switch to {compat_,}import_iovec() vmsplice_to_user(): switch to import_iovec() kill aio_setup_single_vector() aio: simplify arguments of aio_setup_..._rw() aio: lift iov_iter_init() into aio_setup_..._rw() lift iov_iter into {compat_,}do_readv_writev() NFS: fix BUG() crash in notify_change() with patch to chown_common() dcache: return -ESTALE not -EBUSY on distributed fs race NTFS: Version 2.1.32 - Update file write from aio_write to write_iter. VFS: Add iov_iter_fault_in_multipages_readable() drop bogus check in file_open_root() switch security_inode_getattr() to struct path * constify tomoyo_realpath_from_path() ...
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/raw.c1
-rw-r--r--net/socket.c15
2 files changed, 6 insertions, 10 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index f027a708b7e0..4a356b7c081b 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -46,7 +46,6 @@
46#include <linux/stddef.h> 46#include <linux/stddef.h>
47#include <linux/slab.h> 47#include <linux/slab.h>
48#include <linux/errno.h> 48#include <linux/errno.h>
49#include <linux/aio.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
51#include <linux/export.h> 50#include <linux/export.h>
52#include <linux/spinlock.h> 51#include <linux/spinlock.h>
diff --git a/net/socket.c b/net/socket.c
index 245330ca0015..1dbff3e60437 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -633,8 +633,7 @@ static int do_sock_sendmsg(struct socket *sock, struct msghdr *msg,
633 init_sync_kiocb(&iocb, NULL); 633 init_sync_kiocb(&iocb, NULL);
634 ret = nosec ? __sock_sendmsg_nosec(&iocb, sock, msg, size) : 634 ret = nosec ? __sock_sendmsg_nosec(&iocb, sock, msg, size) :
635 __sock_sendmsg(&iocb, sock, msg, size); 635 __sock_sendmsg(&iocb, sock, msg, size);
636 if (-EIOCBQUEUED == ret) 636 BUG_ON(ret == -EIOCBQUEUED);
637 ret = wait_on_sync_kiocb(&iocb);
638 return ret; 637 return ret;
639} 638}
640 639
@@ -766,8 +765,7 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
766 765
767 init_sync_kiocb(&iocb, NULL); 766 init_sync_kiocb(&iocb, NULL);
768 ret = __sock_recvmsg(&iocb, sock, msg, size, flags); 767 ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
769 if (-EIOCBQUEUED == ret) 768 BUG_ON(ret == -EIOCBQUEUED);
770 ret = wait_on_sync_kiocb(&iocb);
771 return ret; 769 return ret;
772} 770}
773EXPORT_SYMBOL(sock_recvmsg); 771EXPORT_SYMBOL(sock_recvmsg);
@@ -780,8 +778,7 @@ static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
780 778
781 init_sync_kiocb(&iocb, NULL); 779 init_sync_kiocb(&iocb, NULL);
782 ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags); 780 ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags);
783 if (-EIOCBQUEUED == ret) 781 BUG_ON(ret == -EIOCBQUEUED);
784 ret = wait_on_sync_kiocb(&iocb);
785 return ret; 782 return ret;
786} 783}
787 784
@@ -858,11 +855,11 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to)
858 if (iocb->ki_pos != 0) 855 if (iocb->ki_pos != 0)
859 return -ESPIPE; 856 return -ESPIPE;
860 857
861 if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */ 858 if (!iov_iter_count(to)) /* Match SYS5 behaviour */
862 return 0; 859 return 0;
863 860
864 res = __sock_recvmsg(iocb, sock, &msg, 861 res = __sock_recvmsg(iocb, sock, &msg,
865 iocb->ki_nbytes, msg.msg_flags); 862 iov_iter_count(to), msg.msg_flags);
866 *to = msg.msg_iter; 863 *to = msg.msg_iter;
867 return res; 864 return res;
868} 865}
@@ -883,7 +880,7 @@ static ssize_t sock_write_iter(struct kiocb *iocb, struct iov_iter *from)
883 if (sock->type == SOCK_SEQPACKET) 880 if (sock->type == SOCK_SEQPACKET)
884 msg.msg_flags |= MSG_EOR; 881 msg.msg_flags |= MSG_EOR;
885 882
886 res = __sock_sendmsg(iocb, sock, &msg, iocb->ki_nbytes); 883 res = __sock_sendmsg(iocb, sock, &msg, iov_iter_count(from));
887 *from = msg.msg_iter; 884 *from = msg.msg_iter;
888 return res; 885 return res;
889} 886}