mapfree: use new smp waiting

This commit is contained in:
Thomas Schoebel-Theuer 2022-08-23 16:21:40 +02:00
parent 2fb55213a3
commit cc55f2fdf4
1 changed files with 4 additions and 3 deletions

View File

@ -30,10 +30,11 @@
#include <linux/list.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/file.h>
#include <linux/pagemap.h>
#include "brick_wait.h"
/* needed for symlink checking */
#include "sy_old/strategy.h"
@ -376,7 +377,7 @@ int mapfree_thread(void *data)
long long eldest = 0;
bool is_empty = true;
wait_event_interruptible_timeout(mapfree_event,
brick_wait_smp(mapfree_event,
!mapfree_period_sec,
mapfree_sleep_jiffies);
@ -566,7 +567,7 @@ void exit_mars_mapfree(void)
MARS_DBG("exit_mapfree()\n");
mapfree_period_sec = -1;
mapfree_sleep_jiffies = 1;
wake_up_interruptible_all(&mapfree_event);
brick_wake_smp(&mapfree_event);
for (i = 0; i < MAPFREE_HASH; i++) {
struct task_struct *thread = mf_table[i].hash_thread;