mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
gfs2: Use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
0f1616f6df
commit
38a618dbf4
@ -212,8 +212,7 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
|
||||
|
||||
spin_lock(&lru_lock);
|
||||
|
||||
list_del(&gl->gl_lru);
|
||||
list_add_tail(&gl->gl_lru, &lru_list);
|
||||
list_move_tail(&gl->gl_lru, &lru_list);
|
||||
|
||||
if (!test_bit(GLF_LRU, &gl->gl_flags)) {
|
||||
set_bit(GLF_LRU, &gl->gl_flags);
|
||||
|
Loading…
Reference in New Issue
Block a user