We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a21d3c commit 5653463Copy full SHA for 5653463
arch/powerpc/kernel/fadump.c
@@ -1373,15 +1373,12 @@ static void fadump_free_elfcorehdr_buf(void)
1373
1374
static void fadump_invalidate_release_mem(void)
1375
{
1376
- mutex_lock(&fadump_mutex);
1377
- if (!fw_dump.dump_active) {
1378
- mutex_unlock(&fadump_mutex);
1379
- return;
+ scoped_guard(mutex, &fadump_mutex) {
+ if (!fw_dump.dump_active)
+ return;
+ fadump_cleanup();
1380
}
1381
1382
- fadump_cleanup();
1383
1384
-
1385
fadump_free_elfcorehdr_buf();
1386
fadump_release_memory(fw_dump.boot_mem_top, memblock_end_of_DRAM());
1387
fadump_free_cpu_notes_buf();
0 commit comments