File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -272,8 +272,8 @@ __cold static int io_rsrc_ref_quiesce(struct io_rsrc_data *data,
272
272
return 0 ;
273
273
274
274
data -> quiesce = true;
275
- mutex_unlock (& ctx -> uring_lock );
276
275
do {
276
+ mutex_unlock (& ctx -> uring_lock );
277
277
ret = io_run_task_work_sig (ctx );
278
278
if (ret < 0 ) {
279
279
mutex_lock (& ctx -> uring_lock );
@@ -285,18 +285,10 @@ __cold static int io_rsrc_ref_quiesce(struct io_rsrc_data *data,
285
285
}
286
286
break ;
287
287
}
288
- ret = wait_for_completion_interruptible (& data -> done );
289
- if (!ret ) {
290
- mutex_lock (& ctx -> uring_lock );
291
- if (!data -> refs )
292
- break ;
293
- /*
294
- * it has been revived by another thread while
295
- * we were unlocked
296
- */
297
- mutex_unlock (& ctx -> uring_lock );
298
- }
299
- } while (1 );
288
+ wait_for_completion_interruptible (& data -> done );
289
+ mutex_lock (& ctx -> uring_lock );
290
+ ret = 0 ;
291
+ } while (data -> refs );
300
292
data -> quiesce = false;
301
293
302
294
return ret ;
You can’t perform that action at this time.
0 commit comments