projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dm bufio: when done scanning return from __scan immediately
[cascardo/linux.git]
/
drivers
/
md
/
dm-bufio.c
diff --git
a/drivers/md/dm-bufio.c
b/drivers/md/dm-bufio.c
index
eab64bc
..
9ea5b60
100644
(file)
--- a/
drivers/md/dm-bufio.c
+++ b/
drivers/md/dm-bufio.c
@@
-1473,9
+1473,9
@@
static long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan,
list_for_each_entry_safe_reverse(b, tmp, &c->lru[l], lru_list) {
freed += __cleanup_old_buffer(b, gfp_mask, 0);
if (!--nr_to_scan)
- break;
+ return freed;
+ dm_bufio_cond_resched();
}
- dm_bufio_cond_resched();
}
return freed;
}