PM: hibernate: remove the bogus call to get_gendisk() in software_resume()
authorChristoph Hellwig <hch@lst.de>
Fri, 25 Sep 2020 16:14:47 +0000 (18:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:05:43 +0000 (09:05 +0100)
commit957559da137af5ee8be1aab7e3c701625f327b9b
tree3a73f8b3b29d0f3d322bf3087664b3504e6f30e6
parentbc46e66817e030b2d5b6c462890c2c8b8f00001d
PM: hibernate: remove the bogus call to get_gendisk() in software_resume()

[ Upstream commit 428805c0c5e76ef643b1fbc893edfb636b3d8aef ]

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")

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>
kernel/power/hibernate.c