[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384976824-32624-1-git-send-email-ddstreet@ieee.org>
Date: Wed, 20 Nov 2013 14:47:04 -0500
From: Dan Streetman <ddstreet@...e.org>
To: Seth Jennings <sjennings@...iantweb.net>
Cc: Dan Streetman <ddstreet@...e.org>, linux-mm@...ck.org,
linux-kernel <linux-kernel@...r.kernel.org>,
Bob Liu <bob.liu@...cle.com>, Minchan Kim <minchan@...nel.org>,
Weijie Yang <weijie.yang@...sung.com>
Subject: [PATCH] mm/zswap: remove unneeded zswap_rb_erase calls
Since zswap_rb_erase was added to the final (when refcount == 0)
zswap_put_entry, there is no need to call zswap_rb_erase before
calling zswap_put_entry.
Signed-off-by: Dan Streetman <ddstreet@...e.org>
---
mm/zswap.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/mm/zswap.c b/mm/zswap.c
index e154f1e..f4fbbd5 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -711,8 +711,6 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset,
ret = zswap_rb_insert(&tree->rbroot, entry, &dupentry);
if (ret == -EEXIST) {
zswap_duplicate_entry++;
- /* remove from rbtree */
- zswap_rb_erase(&tree->rbroot, dupentry);
zswap_entry_put(tree, dupentry);
}
} while (ret == -EEXIST);
@@ -787,9 +785,6 @@ static void zswap_frontswap_invalidate_page(unsigned type, pgoff_t offset)
return;
}
- /* remove from rbtree */
- zswap_rb_erase(&tree->rbroot, entry);
-
/* drop the initial reference from entry creation */
zswap_entry_put(tree, entry);
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists