Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[firefly-linux-kernel-4.4.55.git] / fs / ubifs / shrinker.c
index f248533841a2df0fb6d4fe3bce4884f5c01f8d02..02feb59cefcac356768d8efdf9e69c9c1ded811e 100644 (file)
@@ -151,7 +151,7 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention)
  * @contention: if any contention, this is set to %1
  *
  * This function walks the list of mounted UBIFS file-systems and frees clean
- * znodes which are older then @age, until at least @nr znodes are freed.
+ * znodes which are older than @age, until at least @nr znodes are freed.
  * Returns the number of freed znodes.
  */
 static int shrink_tnc_trees(int nr, int age, int *contention)
@@ -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);