diff --git a/[refs] b/[refs] index 2f081b8881d4..b7d582576fb7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1480de0340a8d5f094b74d7c4b902456c9a06903 +refs/heads/master: 052b1987faca3606109d88d96bce124851f7c4c2 diff --git a/trunk/mm/swapfile.c b/trunk/mm/swapfile.c index b82c028cfcc6..21b56945c5d2 100644 --- a/trunk/mm/swapfile.c +++ b/trunk/mm/swapfile.c @@ -2103,7 +2103,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) p->flags |= SWP_SOLIDSTATE; p->cluster_next = 1 + (random32() % p->highest_bit); } - if (discard_swap(p) == 0 && (swap_flags & SWAP_FLAG_DISCARD)) + if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0) p->flags |= SWP_DISCARDABLE; }