History

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 2df83fa4bce421f ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")

Christoph Hellwig committed 6 years ago

Commit 428805c1 parent 55c44781 file · +0 −11Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/power/hibernate.c+0−11
@@ -948,17 +948,6 @@ static int software_resume(void) · 947 unmodified lines
948 948
949 /* Check if the device is there */949 /* Check if the device is there */
950 swsusp_resume_device = name_to_dev_t(resume_file);950 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
962 if (!swsusp_resume_device) {951 if (!swsusp_resume_device) {
963 /*952 /*
964 * Some device discovery might still be in progress; we need953 * Some device discovery might still be in progress; we need

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t