loop: mutex already unlocked in loop_clr_fd()

mount/1865 is trying to release lock (&lo->lo_ctl_mutex) at:
but there are no more locks to release!

mutex is already unlocked in loop_clr_fd(), we should not
try to unlock it in lo_release() again.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by Alexander Beregalov and committed by Jens Axboe ffcd7dca b029195d

+5 -2
+5 -2
drivers/block/loop.c
··· 1431 1431 static int lo_release(struct gendisk *disk, fmode_t mode) 1432 1432 { 1433 1433 struct loop_device *lo = disk->private_data; 1434 + int err; 1434 1435 1435 1436 mutex_lock(&lo->lo_ctl_mutex); 1436 1437 ··· 1443 1442 * In autoclear mode, stop the loop thread 1444 1443 * and remove configuration after last close. 1445 1444 */ 1446 - loop_clr_fd(lo, NULL); 1445 + err = loop_clr_fd(lo, NULL); 1446 + if (!err) 1447 + goto out_unlocked; 1447 1448 } else { 1448 1449 /* 1449 1450 * Otherwise keep thread (if running) and config, ··· 1456 1453 1457 1454 out: 1458 1455 mutex_unlock(&lo->lo_ctl_mutex); 1459 - 1456 + out_unlocked: 1460 1457 return 0; 1461 1458 } 1462 1459