Skip to content

Commit 428805c

Browse files
Christoph Hellwigrafaeljw
authored andcommitted
PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
get_gendisk grabs a reference on the disk and file operation, so this code will leak both of them while having absolutely no use for the gendisk itself. This effectively reverts commit 2df83fa ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 55c4478 commit 428805c

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

kernel/power/hibernate.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -948,17 +948,6 @@ static int software_resume(void)
948948

949949
/* Check if the device is there */
950950
swsusp_resume_device = name_to_dev_t(resume_file);
951-
952-
/*
953-
* name_to_dev_t is ineffective to verify parition if resume_file is in
954-
* integer format. (e.g. major:minor)
955-
*/
956-
if (isdigit(resume_file[0]) && resume_wait) {
957-
int partno;
958-
while (!get_gendisk(swsusp_resume_device, &partno))
959-
msleep(10);
960-
}
961-
962951
if (!swsusp_resume_device) {
963952
/*
964953
* Some device discovery might still be in progress; we need

0 commit comments

Comments
 (0)