mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-16 12:04:08 +00:00
dm writecache: use list_move instead of list_del/list_add in writecache_writeback()
Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
991bd8d7bc
commit
8c77f1cb84
1 changed files with 3 additions and 6 deletions
|
@ -1864,15 +1864,13 @@ restart:
|
|||
if (unlikely(read_original_sector(wc, f) ==
|
||||
read_original_sector(wc, e))) {
|
||||
BUG_ON(!f->write_in_progress);
|
||||
list_del(&e->lru);
|
||||
list_add(&e->lru, &skipped);
|
||||
list_move(&e->lru, &skipped);
|
||||
cond_resched();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
wc->writeback_size++;
|
||||
list_del(&e->lru);
|
||||
list_add(&e->lru, &wbl.list);
|
||||
list_move(&e->lru, &wbl.list);
|
||||
wbl.size++;
|
||||
e->write_in_progress = true;
|
||||
e->wc_list_contiguous = 1;
|
||||
|
@ -1907,8 +1905,7 @@ restart:
|
|||
// break;
|
||||
|
||||
wc->writeback_size++;
|
||||
list_del(&g->lru);
|
||||
list_add(&g->lru, &wbl.list);
|
||||
list_move(&g->lru, &wbl.list);
|
||||
wbl.size++;
|
||||
g->write_in_progress = true;
|
||||
g->wc_list_contiguous = BIO_MAX_VECS;
|
||||
|
|
Loading…
Add table
Reference in a new issue