]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nfs: remove nfs_page_length
authorChristoph Hellwig <hch@lst.de>
Fri, 5 Jul 2024 05:38:38 +0000 (07:38 +0200)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 10 Jul 2024 17:28:06 +0000 (13:28 -0400)
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>
fs/nfs/internal.h

index 87ebc4608c316a6e5291fd40871b5e6d8c6c792f..5902a9beca1f3fead4637c78c730b11bcd7b051c 100644 (file)
@@ -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
  */