diff options
author | Scott Bauer <scott.bauer@intel.com> | 2017-02-22 10:15:06 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-23 11:55:41 -0700 |
commit | 7d6d15789d69856f1c5405e106a773c87277eb8c (patch) | |
tree | 7ae43ae226e85c4db783756a3c07f14ed1dbd0cf /include/linux/sed-opal.h | |
parent | 124298bd03acebd9c9da29a794718aca31bec1f7 (diff) | |
download | talos-op-linux-7d6d15789d69856f1c5405e106a773c87277eb8c.tar.gz talos-op-linux-7d6d15789d69856f1c5405e106a773c87277eb8c.zip |
block/sed-opal: Introduce free_opal_dev to free the structure and clean up state
Before we free the opal structure we need to clean up any saved
locking ranges that the user had told us to unlock from a suspend.
Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/sed-opal.h')
-rw-r--r-- | include/linux/sed-opal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h index deee23d012e7..04b124fca51e 100644 --- a/include/linux/sed-opal.h +++ b/include/linux/sed-opal.h @@ -27,6 +27,7 @@ typedef int (sec_send_recv)(void *data, u16 spsp, u8 secp, void *buffer, size_t len, bool send); #ifdef CONFIG_BLK_SED_OPAL +void free_opal_dev(struct opal_dev *dev); bool opal_unlock_from_suspend(struct opal_dev *dev); struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv); int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *ioctl_ptr); @@ -51,6 +52,10 @@ static inline bool is_sed_ioctl(unsigned int cmd) return false; } #else +static inline void free_opal_dev(struct opal_dev *dev) +{ +} + static inline bool is_sed_ioctl(unsigned int cmd) { return false; |