diff mbox series

nfs: remove nfs_page_length

Message ID 20240705053838.2043203-1-hch@lst.de (mailing list archive)
State New
Headers show
Series nfs: remove nfs_page_length | expand

Commit Message

Christoph Hellwig July 5, 2024, 5:38 a.m. UTC
The nfs_page_length is not used anywhere, remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/nfs/internal.h | 19 -------------------
 1 file changed, 19 deletions(-)

Comments

Sagi Grimberg July 6, 2024, 9:40 p.m. UTC | #1
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff mbox series

Patch

diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 87ebc4608c316a..5902a9beca1f3f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -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
  */