mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Linux 3.17 compat: remove wait_on_bit action function
Linux kernel 3.17 removes the action function argument from wait_on_bit(). Add autoconf test and compatibility macro to support the new interface. The former "wait_on_bit" interface required an 'action' function to be provided which does the actual waiting. There were over 20 such functions in the kernel, many of them identical, though most cases can be satisfied by one of just two functions: one which uses io_schedule() and one which just uses schedule(). This API change was made to consolidate all of those redundant wait functions. References: torvalds/linux@7431620 Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #378
This commit is contained in:
committed by
Brian Behlendorf
parent
f2297b5a89
commit
2fc44f66ec
@@ -1900,13 +1900,6 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc)
|
||||
return !test_bit(KMC_BIT_GROWING, &skc->skc_flags);
|
||||
}
|
||||
|
||||
static int
|
||||
spl_cache_reclaim_wait(void *word)
|
||||
{
|
||||
schedule();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* No available objects on any slabs, create a new slab. Note that this
|
||||
* functionality is disabled for KMC_SLAB caches which are backed by the
|
||||
@@ -1928,8 +1921,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj)
|
||||
* then return so the local magazine can be rechecked for new objects.
|
||||
*/
|
||||
if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) {
|
||||
rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
|
||||
spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE);
|
||||
rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
|
||||
TASK_UNINTERRUPTIBLE);
|
||||
SRETURN(rc ? rc : -EAGAIN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user