We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9147566 + b36478a commit ead8ccbCopy full SHA for ead8ccb
1 file changed
drivers/md/bcache/super.c
@@ -1373,6 +1373,13 @@ static CLOSURE_CALLBACK(cached_dev_free)
1373
1374
mutex_unlock(&bch_register_lock);
1375
1376
+ /*
1377
+ * Wait for any pending sb_write to complete before free.
1378
+ * The sb_bio is embedded in struct cached_dev, so we must
1379
+ * ensure no I/O is in progress.
1380
+ */
1381
+ closure_sync(&dc->sb_write);
1382
+
1383
if (dc->sb_disk)
1384
folio_put(virt_to_folio(dc->sb_disk));
1385
0 commit comments