lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] Fix the hibernation test_resume's swapfile open mode
Date
Fix the regression brought by
commit 5904de0d735b ("PM: hibernate: Do not get block device exclusively
in test_resume mode"), which incorrectly open the swapfile in a wrong
mode, and causes unexpected behavior during non-hibernation operation.

Fix it by really disabling exclusive mode under test_resume.

This is the v2 of the fix for a hibernation test_resume swapfile open issue.
Chenzhou found that v1 has a warning during the stress test. It was due to
broken open mode in swsusp_write(), fixes it in v2.

patch 1 is a renaming of the function parameter, to better reflects the swap
device open mode.
patch 2 is to fix the open mode on the swap device.

v1: https://lore.kernel.org/lkml/20230823161329.7348-1-yu.c.chen@intel.com/

Chen Yu (2):
PM: hibernate: Rename the function parameter from snapshot_test to
exclusive
PM: hibernate: Fix the exclusive get block device in test_resume mode

kernel/power/hibernate.c | 12 ++++++------
kernel/power/power.h | 4 ++--
kernel/power/swap.c | 14 ++++++++------
3 files changed, 16 insertions(+), 14 deletions(-)

--
2.25.1

\
 
 \ /
  Last update: 2023-09-06 06:19    [W:0.406 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site