summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/shrinker.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2009-02-13 09:13:11 +0100
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-02-17 12:45:22 +0200
commitec32816f94a0baf90f5e73033dcdbc8679c7f91d (patch)
treec8b1c9b3d4f782e131c621ae27a7cf74de041995 /fs/ubifs/shrinker.c
parent2bc275e9b04f23708c495a8bfe92a5f4b65345c8 (diff)
downloadlinux-ec32816f94a0baf90f5e73033dcdbc8679c7f91d.tar.gz
linux-ec32816f94a0baf90f5e73033dcdbc8679c7f91d.tar.bz2
linux-ec32816f94a0baf90f5e73033dcdbc8679c7f91d.zip
UBIFS: list usage cleanup
Trivial cleanup, list_del(); list_add{,_tail}() is equivalent to list_move{,_tail}(). Semantic patch for coccinelle can be found at www.cccmz.de/~snakebyte/list_move_tail.spatch Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/shrinker.c')
-rw-r--r--fs/ubifs/shrinker.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ubifs/shrinker.c b/fs/ubifs/shrinker.c
index e7bab52a1410..02feb59cefca 100644
--- a/fs/ubifs/shrinker.c
+++ b/fs/ubifs/shrinker.c
@@ -206,8 +206,7 @@ static int shrink_tnc_trees(int nr, int age, int *contention)
* Move this one to the end of the list to provide some
* fairness.
*/
- list_del(&c->infos_list);
- list_add_tail(&c->infos_list, &ubifs_infos);
+ list_move_tail(&c->infos_list, &ubifs_infos);
mutex_unlock(&c->umount_mutex);
if (freed >= nr)
break;
@@ -263,8 +262,7 @@ static int kick_a_thread(void)
}
if (i == 1) {
- list_del(&c->infos_list);
- list_add_tail(&c->infos_list, &ubifs_infos);
+ list_move_tail(&c->infos_list, &ubifs_infos);
spin_unlock(&ubifs_infos_lock);
ubifs_request_bg_commit(c);