diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-03-18 14:09:26 -0400 |
---|---|---|
committer | Benjamin LaHaise <bcrl@kvack.org> | 2013-07-30 11:53:12 -0400 |
commit | d29c445b635b3a03cf683cafcbae58a4ec1e1125 (patch) | |
tree | b5fd2e245838a1ce4bd672b014d2d318a81d86e4 /net/socket.c | |
parent | 57282d8fd744072d6d6f18fa6ebe3cc1149015bf (diff) |
aio: Kill ki_dtor
sock_aio_dtor() is dead code - and stuff that does need to do cleanup
can simply do it before calling aio_complete().
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/socket.c b/net/socket.c index fea902f2ba58..06a082e0e49c 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -854,11 +854,6 @@ int kernel_recvmsg(struct socket *sock, struct msghdr *msg, | |||
854 | } | 854 | } |
855 | EXPORT_SYMBOL(kernel_recvmsg); | 855 | EXPORT_SYMBOL(kernel_recvmsg); |
856 | 856 | ||
857 | static void sock_aio_dtor(struct kiocb *iocb) | ||
858 | { | ||
859 | kfree(iocb->private); | ||
860 | } | ||
861 | |||
862 | static ssize_t sock_sendpage(struct file *file, struct page *page, | 857 | static ssize_t sock_sendpage(struct file *file, struct page *page, |
863 | int offset, size_t size, loff_t *ppos, int more) | 858 | int offset, size_t size, loff_t *ppos, int more) |
864 | { | 859 | { |
@@ -889,12 +884,8 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos, | |||
889 | static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb, | 884 | static struct sock_iocb *alloc_sock_iocb(struct kiocb *iocb, |
890 | struct sock_iocb *siocb) | 885 | struct sock_iocb *siocb) |
891 | { | 886 | { |
892 | if (!is_sync_kiocb(iocb)) { | 887 | if (!is_sync_kiocb(iocb)) |
893 | siocb = kmalloc(sizeof(*siocb), GFP_KERNEL); | 888 | BUG(); |
894 | if (!siocb) | ||
895 | return NULL; | ||
896 | iocb->ki_dtor = sock_aio_dtor; | ||
897 | } | ||
898 | 889 | ||
899 | siocb->kiocb = iocb; | 890 | siocb->kiocb = iocb; |
900 | iocb->private = siocb; | 891 | iocb->private = siocb; |