mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
nfs: remove nfs_page_length
The nfs_page_length is not used anywhere, remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
b1043a3304
commit
7f296b25f2
1 changed files with 0 additions and 19 deletions
|
@ -797,25 +797,6 @@ static inline void nfs_folio_mark_unstable(struct folio *folio,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the number of bytes of data the page contains
|
||||
*/
|
||||
static inline
|
||||
unsigned int nfs_page_length(struct page *page)
|
||||
{
|
||||
loff_t i_size = i_size_read(page->mapping->host);
|
||||
|
||||
if (i_size > 0) {
|
||||
pgoff_t index = page_index(page);
|
||||
pgoff_t end_index = (i_size - 1) >> PAGE_SHIFT;
|
||||
if (index < end_index)
|
||||
return PAGE_SIZE;
|
||||
if (index == end_index)
|
||||
return ((i_size - 1) & ~PAGE_MASK) + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the number of bytes of data the page contains
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue