Files
linux/mm
Shaohua Li 07fb30fa5b swap: don't do discard if no discard option added
commit 052b1987fa upstream.

When swapon() was not passed the SWAP_FLAG_DISCARD option, sys_swapon()
will still perform a discard operation.  This can cause problems if
discard is slow or buggy.

Reverse the order of the check so that a discard operation is performed
only if the sys_swapon() caller is attempting to enable discard.

Signed-off-by: Shaohua Li <shli@fusionio.com>
Reported-by: Holger Kiehl <Holger.Kiehl@dwd.de>
Tested-by: Holger Kiehl <Holger.Kiehl@dwd.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2012-05-31 00:43:47 +01:00
..
2012-03-12 12:31:26 -07:00
2011-03-31 11:26:23 -03:00
2011-07-26 16:49:47 -07:00
2011-11-02 16:06:57 -07:00
2011-10-31 17:30:47 -07:00
2011-07-20 20:47:46 -04:00
2011-10-31 17:30:44 -07:00
2011-10-31 17:30:50 -07:00
2010-05-21 18:31:21 -04:00
2011-03-10 08:52:27 +01:00
2011-05-20 12:50:29 -07:00
2011-10-31 17:30:44 -07:00
2011-12-05 09:44:00 +01:00
2012-02-13 11:17:01 -08:00
2011-10-31 17:30:50 -07:00
2011-10-31 17:30:51 -07:00