File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1296,6 +1296,7 @@ int get_tree_bdev(struct fs_context *fc,
1296
1296
mutex_lock (& bdev -> bd_fsfreeze_mutex );
1297
1297
if (bdev -> bd_fsfreeze_count > 0 ) {
1298
1298
mutex_unlock (& bdev -> bd_fsfreeze_mutex );
1299
+ blkdev_put (bdev , mode );
1299
1300
warnf (fc , "%pg: Can't mount, blockdev is frozen" , bdev );
1300
1301
return - EBUSY ;
1301
1302
}
@@ -1304,8 +1305,10 @@ int get_tree_bdev(struct fs_context *fc,
1304
1305
fc -> sget_key = bdev ;
1305
1306
s = sget_fc (fc , test_bdev_super_fc , set_bdev_super_fc );
1306
1307
mutex_unlock (& bdev -> bd_fsfreeze_mutex );
1307
- if (IS_ERR (s ))
1308
+ if (IS_ERR (s )) {
1309
+ blkdev_put (bdev , mode );
1308
1310
return PTR_ERR (s );
1311
+ }
1309
1312
1310
1313
if (s -> s_root ) {
1311
1314
/* Don't summarily change the RO/RW state. */
You can’t perform that action at this time.
0 commit comments