|
@@ -2103,7 +2103,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
|
|
p->flags |= SWP_SOLIDSTATE;
|
|
p->flags |= SWP_SOLIDSTATE;
|
|
p->cluster_next = 1 + (random32() % p->highest_bit);
|
|
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;
|
|
p->flags |= SWP_DISCARDABLE;
|
|
}
|
|
}
|
|
|
|
|