diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 4016d2c191cedf9bdc756489bead9bb3fa7b34d7..0b41e1db4de99b69acb226b39827c82caa3d6259 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -63,8 +63,6 @@ #define LIST_DIRTY 1 #define LIST_SIZE 2 -#define SCAN_RESCHED_CYCLE 16 - /* * Linking of buffers: * All buffers are linked to cache_hash with their hash_list field. @@ -1601,12 +1599,7 @@ static unsigned long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan, freed++; if (!--nr_to_scan || ((count - freed) <= retain_target)) return freed; - - if (unlikely(freed % SCAN_RESCHED_CYCLE == 0)) { - dm_bufio_unlock(c); - cond_resched(); - dm_bufio_lock(c); - } + cond_resched(); } } return freed;