Do not clear work->mm since io_madvise() passes it to do_madvise() when the request is actually processed. Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@xxxxxxxxxx> --- fs/io-wq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/io-wq.c b/fs/io-wq.c index 4023c98..4d20754 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -431,8 +431,6 @@ static void io_wq_switch_mm(struct io_worker *worker, struct io_wq_work *work) if (!worker->mm) set_fs(USER_DS); worker->mm = work->mm; - /* hang on to this mm */ - work->mm = NULL; return; } -- 1.8.3.1