projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MAINTAINERS: update selinux entry
[firefly-linux-kernel-4.4.55.git]
/
mm
/
swapfile.c
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index b9fc0e5de6d50d1892dca42e02ae5d0ad48d7a47..a2d9bb4e80df7e3f977b07df8223584c78aba31a 100644
(file)
--- a/
mm/swapfile.c
+++ b/
mm/swapfile.c
@@
-434,7
+434,7
@@
void free_swap_and_cache(swp_entry_t entry)
*
* This is needed for the suspend to disk (aka swsusp).
*/
*
* This is needed for the suspend to disk (aka swsusp).
*/
-int swap_type_of(dev_t device, sector_t offset)
+int swap_type_of(dev_t device, sector_t offset
, struct block_device **bdev_p
)
{
struct block_device *bdev = NULL;
int i;
{
struct block_device *bdev = NULL;
int i;
@@
-450,6
+450,9
@@
int swap_type_of(dev_t device, sector_t offset)
continue;
if (!bdev) {
continue;
if (!bdev) {
+ if (bdev_p)
+ *bdev_p = sis->bdev;
+
spin_unlock(&swap_lock);
return i;
}
spin_unlock(&swap_lock);
return i;
}
@@
-459,6
+462,9
@@
int swap_type_of(dev_t device, sector_t offset)
se = list_entry(sis->extent_list.next,
struct swap_extent, list);
if (se->start_block == offset) {
se = list_entry(sis->extent_list.next,
struct swap_extent, list);
if (se->start_block == offset) {
+ if (bdev_p)
+ *bdev_p = sis->bdev;
+
spin_unlock(&swap_lock);
bdput(bdev);
return i;
spin_unlock(&swap_lock);
bdput(bdev);
return i;