diff options
| author | Ondrej Kozina <okozina@redhat.com> | 2026-01-30 17:33:52 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-02-02 07:04:43 -0700 |
| commit | 06564bae93d024e346c49304dfb4e2aaa68cf620 (patch) | |
| tree | df904a8d3a3a5907977a34186c676c4b36d21c98 /block | |
| parent | 229f4125746a520b42bde1005c22fe27117f57f5 (diff) | |
sed-opal: ignore locking ranges array when not enabling SUM.
The locking ranges count and the array items are always ignored unless
Single User Mode (SUM) is requested in the activate method.
It is useless to enforce limits of unused array in the non-SUM case.
Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/sed-opal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c index 5a28f23f7f22..23a19c92d791 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -2940,7 +2940,8 @@ static int opal_activate_lsp(struct opal_dev *dev, }; int ret; - if (!opal_lr_act->num_lrs || opal_lr_act->num_lrs > OPAL_MAX_LRS) + if (opal_lr_act->sum && + (!opal_lr_act->num_lrs || opal_lr_act->num_lrs > OPAL_MAX_LRS)) return -EINVAL; ret = opal_get_key(dev, &opal_lr_act->key); |
