diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-28 00:39:04 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-28 00:39:04 -0700 |
| commit | 26123e88eff35480fb39e659816609fde340e80d (patch) | |
| tree | a786d00973bf34883ff99242d05c0fc85f97453f /include | |
| parent | 34c8c09878c341f1f10216fdeb985d3244bf2f31 (diff) | |
| parent | 371135bd6e10d0d00a4437b5c7f75e231ef649ce (diff) | |
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/aio.h | 7 | ||||
| -rw-r--r-- | include/net/sock.h | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 93fe78800740..461a3b0736e0 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h @@ -23,8 +23,6 @@ struct kioctx; #define KIOCB_SYNC_KEY (~0U) -#define KIOCB_PRIVATE_SIZE (24 * sizeof(long)) - /* ki_flags bits */ #define KIF_LOCKED 0 #define KIF_KICKED 1 @@ -55,6 +53,7 @@ struct kiocb { struct kioctx *ki_ctx; /* may be NULL for sync ops */ int (*ki_cancel)(struct kiocb *, struct io_event *); long (*ki_retry)(struct kiocb *); + void (*ki_dtor)(struct kiocb *); struct list_head ki_list; /* the aio core uses this * for cancellation */ @@ -65,8 +64,7 @@ struct kiocb { } ki_obj; __u64 ki_user_data; /* user's data for completion */ loff_t ki_pos; - - char private[KIOCB_PRIVATE_SIZE]; + void *private; }; #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) @@ -79,6 +77,7 @@ struct kiocb { (x)->ki_filp = (filp); \ (x)->ki_ctx = &tsk->active_mm->default_kioctx; \ (x)->ki_cancel = NULL; \ + (x)->ki_dtor = NULL; \ (x)->ki_obj.tsk = tsk; \ } while (0) diff --git a/include/net/sock.h b/include/net/sock.h index c3277f3ecb20..4dcba49115ba 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -617,17 +617,17 @@ struct sock_iocb { struct scm_cookie *scm; struct msghdr *msg, async_msg; struct iovec async_iov; + struct kiocb *kiocb; }; static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb) { - BUG_ON(sizeof(struct sock_iocb) > KIOCB_PRIVATE_SIZE); return (struct sock_iocb *)iocb->private; } static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si) { - return container_of((void *)si, struct kiocb, private); + return si->kiocb; } struct socket_alloc { |
