linux510/512/513-tkg: futex2: Use page_to_pgoff instead of hugetlb_basepage_index for more modularity.

This follows a quick chat with @logos128 : 1137522351 (commitcomment-52947483)
This commit is contained in:
Tk-Glitch
2021-07-04 16:38:20 +02:00
parent cc0a378fe1
commit d0cf5077d2
4 changed files with 9 additions and 9 deletions

View File

@@ -1027,7 +1027,7 @@ index ade407c1abb7..51086d0c3fd5 100644
*/
#include <linux/freezer.h>
+#include <linux/pagemap.h>
+#include <linux/hugetlb.h>
#include <linux/jhash.h>
#include <linux/memblock.h>
+#include <linux/pagemap.h>
@@ -1230,7 +1230,7 @@ index ade407c1abb7..51086d0c3fd5 100644
+ }
+
+ key->pointer = futex_get_inode_uuid(inode);
+ key->index = (unsigned long)hugetlb_basepage_index(tail);
+ key->index = (unsigned long)page_to_pgoff(tail);
+ key->offset |= FUT_OFF_INODE;
+
+ rcu_read_unlock();