aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2017-05-26 11:32:04 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-05-29 09:22:18 +1000
commitbb7b4cd463a048de53144f188f27ccfbf9e7f090 (patch)
treeeed94f4e10b5abb371e2c24f82162056c4f95d45
parent7cfaa752b124846138c7cc96d1aada9d0ae66492 (diff)
mm-swap-sort-swap-entries-before-free-fix
tweak comment Cc: Huang Ying <ying.huang@intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/swapfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 5242d25bf4a5..6ba4aab2db0b 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1218,10 +1218,9 @@ void swapcache_free_entries(swp_entry_t *entries, int n)
p = NULL;
/*
- * Sort swap entries by swap device, so each lock is only
- * taken once. Although nr_swapfiles isn't absolute correct,
- * but the overhead of sort() is so low that it isn't
- * necessary to optimize further.
+ * Sort swap entries by swap device, so each lock is only taken once.
+ * nr_swapfiles isn't absolutely correct, but the overhead of sort() is
+ * so low that it isn't necessary to optimize further.
*/
if (nr_swapfiles > 1)
sort(entries, n, sizeof(entries[0]), swp_entry_cmp, NULL);