On Fri, Jan 15, 2016 at 04:39:11PM +0900, Junil Lee wrote:
Signed-off-by: Junil Lee <junil0814.lee@xxxxxxx>
Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
Below comment.
---
mm/zsmalloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index e7414ce..a24ccb1 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1635,6 +1635,8 @@ static int migrate_zspage(struct zs_pool *pool, struct size_class *class,
free_obj = obj_malloc(d_page, class, handle);
zs_object_copy(free_obj, used_obj, class);
index++;
+ /* Must not unlock before unpin_tag() */
I want to make comment more clear.
/*
* record_obj updates handle's value to free_obj and it will invalidate
* lock bit(ie, HANDLE_PIN_BIT) of handle, which breaks synchronization
* using pin_tag(e,g, zs_free) so let's keep the lock bit.
*/
Thanks.
+ free_obj |= BIT(HANDLE_PIN_BIT);
record_obj(handle, free_obj);
unpin_tag(handle);
obj_free(pool, class, used_obj);
--
2.6.2