The patch titled Subject: swapfile: initialize spinlock for swap_cluster_info has been removed from the -mm tree. Its filename was mm-swap-add-cluster-lock-v5-fix.patch This patch was dropped because it was folded into mm-swap-add-cluster-lock.patch ------------------------------------------------------ From: Minchan Kim <minchan@xxxxxxxxxx> Subject: swapfile: initialize spinlock for swap_cluster_info We changed swap_cluster_info lock from bit_spin_lock to spinlock so we need to initialize the spinlock before the using. Otherwise, lockdep is broken. Link: http://lkml.kernel.org/r/1486434945-29753-1-git-send-email-minchan@xxxxxxxxxx Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx> Reviewed-by: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swapfile.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff -puN mm/swapfile.c~mm-swap-add-cluster-lock-v5-fix mm/swapfile.c --- a/mm/swapfile.c~mm-swap-add-cluster-lock-v5-fix +++ a/mm/swapfile.c @@ -2591,6 +2591,7 @@ SYSCALL_DEFINE2(swapon, const char __use if (p->bdev && blk_queue_nonrot(bdev_get_queue(p->bdev))) { int cpu; + unsigned long ci, nr_cluster; p->flags |= SWP_SOLIDSTATE; /* @@ -2598,13 +2599,17 @@ SYSCALL_DEFINE2(swapon, const char __use * SSD */ p->cluster_next = 1 + (prandom_u32() % p->highest_bit); + nr_cluster = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); - cluster_info = vzalloc(DIV_ROUND_UP(maxpages, - SWAPFILE_CLUSTER) * sizeof(*cluster_info)); + cluster_info = vzalloc(nr_cluster * sizeof(*cluster_info)); if (!cluster_info) { error = -ENOMEM; goto bad_swap; } + + for (ci = 0; ci < nr_cluster; ci++) + spin_lock_init(&((cluster_info + ci)->lock)); + p->percpu_cluster = alloc_percpu(struct percpu_cluster); if (!p->percpu_cluster) { error = -ENOMEM; _ Patches currently in -mm which might be from minchan@xxxxxxxxxx are mm-swap-add-cluster-lock.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html