File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -158,10 +158,9 @@ arc_default_max(uint64_t min, uint64_t allmem)
158
158
static void
159
159
arc_prune_task (void * arg )
160
160
{
161
- int64_t nr_scan = * ( int64_t * )arg ;
161
+ int64_t nr_scan = ( intptr_t )arg ;
162
162
163
163
arc_reduce_target_size (ptob (nr_scan ));
164
- free (arg , M_TEMP );
165
164
#if __FreeBSD_version >= 1300139
166
165
sx_xlock (& arc_vnlru_lock );
167
166
vnlru_free_vfsops (nr_scan , & zfs_vfsops , arc_vnlru_marker );
@@ -186,13 +185,12 @@ void
186
185
arc_prune_async (int64_t adjust )
187
186
{
188
187
189
- int64_t * adjustptr ;
190
-
191
- if ((adjustptr = malloc (sizeof (int64_t ), M_TEMP , M_NOWAIT )) == NULL )
192
- return ;
193
-
194
- * adjustptr = adjust ;
195
- taskq_dispatch (arc_prune_taskq , arc_prune_task , adjustptr , TQ_SLEEP );
188
+ #ifndef __LP64__
189
+ if (adjust > INTPTR_MAX )
190
+ adjust = INTPTR_MAX ;
191
+ #endif
192
+ taskq_dispatch (arc_prune_taskq , arc_prune_task ,
193
+ (void * )(intptr_t )adjust , TQ_SLEEP );
196
194
ARCSTAT_BUMP (arcstat_prune );
197
195
}
198
196
You can’t perform that action at this time.
0 commit comments