Skip to content

Commit 9f19609

Browse files
Christoph Hellwiggregkh
authored andcommitted
PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
[ Upstream commit 428805c ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6cc0a24 commit 9f19609

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
@@ -851,17 +851,6 @@ static int software_resume(void)
851851

852852
/* Check if the device is there */
853853
swsusp_resume_device = name_to_dev_t(resume_file);
854-
855-
/*
856-
* name_to_dev_t is ineffective to verify parition if resume_file is in
857-
* integer format. (e.g. major:minor)
858-
*/
859-
if (isdigit(resume_file[0]) && resume_wait) {
860-
int partno;
861-
while (!get_gendisk(swsusp_resume_device, &partno))
862-
msleep(10);
863-
}
864-
865854
if (!swsusp_resume_device) {
866855
/*
867856
* Some device discovery might still be in progress; we need

0 commit comments

Comments
 (0)