summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-03-22 03:34:17 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 04:55:00 +0400
commit052b1987faca3606109d88d96bce124851f7c4c2 (patch)
tree879df883edb01ea6e0da880e391b06bb69058129 /kernel
parent1480de0340a8d5f094b74d7c4b902456c9a06903 (diff)
downloadlinux-052b1987faca3606109d88d96bce124851f7c4c2.tar.xz
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>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions