|
@@ -258,23 +258,14 @@ xfs_bmapi_allocate_worker(
|
|
struct xfs_bmalloca *args = container_of(work,
|
|
struct xfs_bmalloca *args = container_of(work,
|
|
struct xfs_bmalloca, work);
|
|
struct xfs_bmalloca, work);
|
|
unsigned long pflags;
|
|
unsigned long pflags;
|
|
- unsigned long new_pflags = PF_FSTRANS;
|
|
|
|
|
|
|
|
- /*
|
|
|
|
- * we are in a transaction context here, but may also be doing work
|
|
|
|
- * in kswapd context, and hence we may need to inherit that state
|
|
|
|
- * temporarily to ensure that we don't block waiting for memory reclaim
|
|
|
|
- * in any way.
|
|
|
|
- */
|
|
|
|
- if (args->kswapd)
|
|
|
|
- new_pflags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD;
|
|
|
|
-
|
|
|
|
- current_set_flags_nested(&pflags, new_pflags);
|
|
|
|
|
|
+ /* we are in a transaction context here */
|
|
|
|
+ current_set_flags_nested(&pflags, PF_FSTRANS);
|
|
|
|
|
|
args->result = __xfs_bmapi_allocate(args);
|
|
args->result = __xfs_bmapi_allocate(args);
|
|
complete(args->done);
|
|
complete(args->done);
|
|
|
|
|
|
- current_restore_flags_nested(&pflags, new_pflags);
|
|
|
|
|
|
+ current_restore_flags_nested(&pflags, PF_FSTRANS);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -293,7 +284,6 @@ xfs_bmapi_allocate(
|
|
|
|
|
|
|
|
|
|
args->done = &done;
|
|
args->done = &done;
|
|
- args->kswapd = current_is_kswapd();
|
|
|
|
INIT_WORK_ONSTACK(&args->work, xfs_bmapi_allocate_worker);
|
|
INIT_WORK_ONSTACK(&args->work, xfs_bmapi_allocate_worker);
|
|
queue_work(xfs_alloc_wq, &args->work);
|
|
queue_work(xfs_alloc_wq, &args->work);
|
|
wait_for_completion(&done);
|
|
wait_for_completion(&done);
|