File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1248,19 +1248,18 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
1248
1248
lo -> lo_flags &= ~LOOP_SET_STATUS_CLEARABLE_FLAGS ;
1249
1249
lo -> lo_flags |= (info -> lo_flags & LOOP_SET_STATUS_SETTABLE_FLAGS );
1250
1250
1251
- if (size_changed ) {
1252
- loff_t new_size = get_size (lo -> lo_offset , lo -> lo_sizelimit ,
1253
- lo -> lo_backing_file );
1254
- loop_set_size (lo , new_size );
1255
- }
1256
-
1257
1251
/* update the direct I/O flag if lo_offset changed */
1258
1252
loop_update_dio (lo );
1259
1253
1260
1254
out_unfreeze :
1261
1255
blk_mq_unfreeze_queue (lo -> lo_queue , memflags );
1262
1256
if (partscan )
1263
1257
clear_bit (GD_SUPPRESS_PART_SCAN , & lo -> lo_disk -> state );
1258
+ if (!err && size_changed ) {
1259
+ loff_t new_size = get_size (lo -> lo_offset , lo -> lo_sizelimit ,
1260
+ lo -> lo_backing_file );
1261
+ loop_set_size (lo , new_size );
1262
+ }
1264
1263
out_unlock :
1265
1264
mutex_unlock (& lo -> lo_mutex );
1266
1265
if (partscan )
You can’t perform that action at this time.
0 commit comments