File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type)
124
124
125
125
node = kzalloc (sizeof (* node ), GFP_KERNEL );
126
126
if (node ) {
127
- node -> ctx_ptr = ( unsigned long ) ctx | type ;
127
+ node -> type = type ;
128
128
node -> refs = 1 ;
129
129
}
130
130
return node ;
@@ -449,7 +449,7 @@ void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
449
449
if (node -> tag )
450
450
io_post_aux_cqe (ctx , node -> tag , 0 , 0 );
451
451
452
- switch (io_rsrc_node_type ( node ) ) {
452
+ switch (node -> type ) {
453
453
case IORING_RSRC_FILE :
454
454
if (io_slot_file (node ))
455
455
fput (io_slot_file (node ));
Original file line number Diff line number Diff line change 11
11
enum {
12
12
IORING_RSRC_FILE = 0 ,
13
13
IORING_RSRC_BUFFER = 1 ,
14
-
15
- IORING_RSRC_TYPE_MASK = 0x3UL ,
16
14
};
17
15
18
16
struct io_rsrc_node {
19
- unsigned long ctx_ptr ;
17
+ unsigned char type ;
20
18
int refs ;
21
19
22
20
u64 tag ;
@@ -106,11 +104,6 @@ static inline void io_req_put_rsrc_nodes(struct io_kiocb *req)
106
104
}
107
105
}
108
106
109
- static inline int io_rsrc_node_type (struct io_rsrc_node * node )
110
- {
111
- return node -> ctx_ptr & IORING_RSRC_TYPE_MASK ;
112
- }
113
-
114
107
static inline void io_req_assign_rsrc_node (struct io_rsrc_node * * dst_node ,
115
108
struct io_rsrc_node * node )
116
109
{
You can’t perform that action at this time.
0 commit comments