projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'trace-v5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git]
/
include
/
linux
/
pagemap.h
diff --git
a/include/linux/pagemap.h
b/include/linux/pagemap.h
index
5dcf446
..
62db6b0
100644
(file)
--- a/
include/linux/pagemap.h
+++ b/
include/linux/pagemap.h
@@
-521,18
+521,17
@@
static inline struct page *read_mapping_page(struct address_space *mapping,
*/
static inline pgoff_t page_to_index(struct page *page)
{
*/
static inline pgoff_t page_to_index(struct page *page)
{
-
pgoff_t pgoff
;
+
struct page *head
;
if (likely(!PageTransTail(page)))
return page->index;
if (likely(!PageTransTail(page)))
return page->index;
+ head = compound_head(page);
/*
* We don't initialize ->index for tail pages: calculate based on
* head page
*/
/*
* We don't initialize ->index for tail pages: calculate based on
* head page
*/
- pgoff = compound_head(page)->index;
- pgoff += page - compound_head(page);
- return pgoff;
+ return head->index + page - head;
}
extern pgoff_t hugetlb_basepage_index(struct page *page);
}
extern pgoff_t hugetlb_basepage_index(struct page *page);