Searched hist:"052 b1987faca3606109d88d96bce124851f7c4c2" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/mm/ |
H A D | swapfile.c | diff 052b1987faca3606109d88d96bce124851f7c4c2 Wed Mar 21 18:34:17 CDT 2012 Shaohua Li <shli@kernel.org> swap: don't do discard if no discard option added
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>
|