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)
12481248 lo -> lo_flags &= ~LOOP_SET_STATUS_CLEARABLE_FLAGS ;
12491249 lo -> lo_flags |= (info -> lo_flags & LOOP_SET_STATUS_SETTABLE_FLAGS );
12501250
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-
12571251 /* update the direct I/O flag if lo_offset changed */
12581252 loop_update_dio (lo );
12591253
12601254out_unfreeze :
12611255 blk_mq_unfreeze_queue (lo -> lo_queue , memflags );
12621256 if (partscan )
12631257 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+ }
12641263out_unlock :
12651264 mutex_unlock (& lo -> lo_mutex );
12661265 if (partscan )
You can’t perform that action at this time.
0 commit comments