Skip to content

Commit 38a618d

Browse files
LiBaokun96Andreas Gruenbacher
authored andcommitted
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 <[email protected]> Signed-off-by: Baokun Li <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 0f1616f commit 38a618d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/gfs2/glock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
212212

213213
spin_lock(&lru_lock);
214214

215-
list_del(&gl->gl_lru);
216-
list_add_tail(&gl->gl_lru, &lru_list);
215+
list_move_tail(&gl->gl_lru, &lru_list);
217216

218217
if (!test_bit(GLF_LRU, &gl->gl_flags)) {
219218
set_bit(GLF_LRU, &gl->gl_flags);

0 commit comments

Comments
 (0)