Commit 2d19020b authored by Scott Bauer's avatar Scott Bauer Committed by Jens Axboe

block/sed-opal: Propagate original error message to userland.

During an error on a comannd, ex: user provides wrong pw to unlock
range, we will gracefully terminate the opal session. We want to
propagate the original error to userland instead of the result of
the session termination, which is almost always a success.
Signed-off-by: default avatarScott Bauer <scott.bauer@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent e286bcfc
...@@ -396,8 +396,11 @@ static int next(struct opal_dev *dev) ...@@ -396,8 +396,11 @@ static int next(struct opal_dev *dev)
* session. Therefore we shouldn't attempt to terminate * session. Therefore we shouldn't attempt to terminate
* a session, as one has not yet been created. * a session, as one has not yet been created.
*/ */
if (state > 1) if (state > 1) {
return end_opal_session_error(dev); end_opal_session_error(dev);
return error;
}
} }
state++; state++;
} while (!error); } while (!error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment