File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -1602,34 +1602,6 @@ static inline ssize_t folio_mkwrite_check_truncate(struct folio *folio,
1602
1602
return offset ;
1603
1603
}
1604
1604
1605
- /**
1606
- * page_mkwrite_check_truncate - check if page was truncated
1607
- * @page: the page to check
1608
- * @inode: the inode to check the page against
1609
- *
1610
- * Returns the number of bytes in the page up to EOF,
1611
- * or -EFAULT if the page was truncated.
1612
- */
1613
- static inline int page_mkwrite_check_truncate (struct page * page ,
1614
- struct inode * inode )
1615
- {
1616
- loff_t size = i_size_read (inode );
1617
- pgoff_t index = size >> PAGE_SHIFT ;
1618
- int offset = offset_in_page (size );
1619
-
1620
- if (page -> mapping != inode -> i_mapping )
1621
- return - EFAULT ;
1622
-
1623
- /* page is wholly inside EOF */
1624
- if (page -> index < index )
1625
- return PAGE_SIZE ;
1626
- /* page is wholly past EOF */
1627
- if (page -> index > index || !offset )
1628
- return - EFAULT ;
1629
- /* page is partially inside EOF */
1630
- return offset ;
1631
- }
1632
-
1633
1605
/**
1634
1606
* i_blocks_per_folio - How many blocks fit in this folio.
1635
1607
* @inode: The inode which contains the blocks.
You can’t perform that action at this time.
0 commit comments