mount-encrypted: handle lack of dm-crypt "allow_discard"

On kernels prior to 3.1, the "allow_discard" option does not exist.
Allow for this by attempting to set up the table twice if the
allow_discard attempt fails.

BUG=chrome-os-partner:11529
TEST=link build, boots 3.2 ok, falls back when option is invalid.

Change-Id: I904d3770543ebdeb0eace9ffa8e6c654cf97976d
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28024
Reviewed-by: Elly Jones <ellyjones@chromium.org>
3 files changed