hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/fs/ubifs/find.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file is part of UBIFS.
34 *
45 * Copyright (C) 2006-2008 Nokia Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published by
8
- * the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along with
16
- * this program; if not, write to the Free Software Foundation, Inc., 51
17
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
186 *
197 * Authors: Artem Bityutskiy (Битюцкий Артём)
208 * Adrian Hunter
....@@ -747,12 +735,6 @@
747735 return lpa->dirty + lpa->free - lpb->dirty - lpb->free;
748736 }
749737
750
-static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b,
751
- int size)
752
-{
753
- swap(*a, *b);
754
-}
755
-
756738 /**
757739 * ubifs_save_dirty_idx_lnums - save an array of the most dirty index LEB nos.
758740 * @c: the UBIFS file-system description object
....@@ -772,8 +754,7 @@
772754 sizeof(void *) * c->dirty_idx.cnt);
773755 /* Sort it so that the dirtiest is now at the end */
774756 sort(c->dirty_idx.arr, c->dirty_idx.cnt, sizeof(void *),
775
- (int (*)(const void *, const void *))cmp_dirty_idx,
776
- (void (*)(void *, void *, int))swap_dirty_idx);
757
+ (int (*)(const void *, const void *))cmp_dirty_idx, NULL);
777758 dbg_find("found %d dirty index LEBs", c->dirty_idx.cnt);
778759 if (c->dirty_idx.cnt)
779760 dbg_find("dirtiest index LEB is %d with dirty %d and free %d",