diff options
-rw-r--r-- | fs/aio.c | 2 | ||||
-rw-r--r-- | include/linux/aio.h | 1 | ||||
-rw-r--r-- | net/socket.c | 13 |
3 files changed, 2 insertions, 14 deletions
@@ -705,8 +705,6 @@ static void kiocb_free(struct kiocb *req) | |||
705 | fput(req->ki_filp); | 705 | fput(req->ki_filp); |
706 | if (req->ki_eventfd != NULL) | 706 | if (req->ki_eventfd != NULL) |
707 | eventfd_ctx_put(req->ki_eventfd); | 707 | eventfd_ctx_put(req->ki_eventfd); |
708 | if (req->ki_dtor) | ||
709 | req->ki_dtor(req); | ||
710 | kmem_cache_free(kiocb_cachep, req); | 708 | kmem_cache_free(kiocb_cachep, req); |
711 | } | 709 | } |
712 | 710 | ||
diff --git a/include/linux/aio.h b/include/linux/aio.h index c4f07ffa1cbb..d9c92daa3944 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -33,7 +33,6 @@ struct kiocb { | |||
33 | struct file *ki_filp; | 33 | struct file *ki_filp; |
34 | struct kioctx *ki_ctx; /* NULL for sync ops */ | 34 | struct kioctx *ki_ctx; /* NULL for sync ops */ |
35 | kiocb_cancel_fn *ki_cancel; | 35 | kiocb_cancel_fn *ki_cancel; |
36 | void (*ki_dtor)(struct kiocb *); | ||
37 | void *private; | 36 | void *private; |
38 | 37 | ||
39 | union { | 38 | union { |
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; |