Skip to content

Commit

Permalink
fixing-slab-issues (#348)
Browse files Browse the repository at this point in the history
* fixing-slab-issues

Co-authored-by: st-matskevich <[email protected]>
  • Loading branch information
Swistusmen and st-matskevich authored Feb 2, 2024
1 parent adf97a7 commit 29a92e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ static int __tracer_setup_snap(struct snap_device *dev, unsigned int minor,

// allocate a gendisk struct
LOG_DEBUG("allocating gendisk");

#ifdef HAVE_BLK_ALLOC_DISK
dev->sd_gd = blk_alloc_disk(NUMA_NO_NODE);
#else
Expand All @@ -1033,7 +1034,9 @@ static int __tracer_setup_snap(struct snap_device *dev, unsigned int minor,

// allocate request queue
LOG_DEBUG("allocating queue");
#ifdef HAVE_BLK_ALLOC_QUEUE_1
#if defined HAVE_MAKE_REQUEST_FN_IN_QUEUE && !defined HAVE_BLK_ALLOC_QUEUE_RH_2
dev->sd_queue = blk_alloc_queue(GFP_KERNEL);
#elif defined HAVE_BLK_ALLOC_QUEUE_1
// #if LINUX_VERSION_CODE < KERNEL_VERSION(5,7,0)
dev->sd_queue = blk_alloc_queue(GFP_KERNEL);
#elif defined HAVE_BLK_ALLOC_QUEUE_RH_2 // el8
Expand Down

0 comments on commit 29a92e8

Please sign in to comment.