mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 07:44:49 +01:00
loop: add missing bd_abort_claiming in loop_set_status
Commit08e136ebd1("loop: don't change loop device under exclusive opener in loop_set_status") forgot to call bd_abort_claiming() when mutex_lock_killable() failed. Fixes:08e136ebd1("loop: don't change loop device under exclusive opener in loop_set_status") Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
6acd4ac5f8
commit
2704024d83
1 changed files with 3 additions and 1 deletions
|
|
@ -1245,7 +1245,8 @@ loop_set_status(struct loop_device *lo, blk_mode_t mode,
|
|||
|
||||
err = mutex_lock_killable(&lo->lo_mutex);
|
||||
if (err)
|
||||
return err;
|
||||
goto out_abort_claiming;
|
||||
|
||||
if (lo->lo_state != Lo_bound) {
|
||||
err = -ENXIO;
|
||||
goto out_unlock;
|
||||
|
|
@ -1284,6 +1285,7 @@ out_unfreeze:
|
|||
}
|
||||
out_unlock:
|
||||
mutex_unlock(&lo->lo_mutex);
|
||||
out_abort_claiming:
|
||||
if (!(mode & BLK_OPEN_EXCL))
|
||||
bd_abort_claiming(bdev, loop_set_status);
|
||||
out_reread_partitions:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue