diff mbox series

[1/7] NFS: Use nfs_i_fscache() consistently within NFS fscache code

Message ID 1637187438-18858-2-git-send-email-dwysocha@redhat.com (mailing list archive)
State New, archived
Headers show
Series Cleanups for NFS fscache and convert from dfprintk to trace events | expand

Commit Message

David Wysochanski Nov. 17, 2021, 10:17 p.m. UTC
The nfs_i_fscache() is the API defined to check whether fscache
is enabled on an NFS inode or not, so use it consistently through
the code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
---
 fs/nfs/fscache.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index 6754c8607230..840608a38713 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -131,7 +131,7 @@  static inline int nfs_readpage_from_fscache(struct nfs_open_context *ctx,
 					    struct inode *inode,
 					    struct page *page)
 {
-	if (NFS_I(inode)->fscache)
+	if (nfs_i_fscache(inode))
 		return __nfs_readpage_from_fscache(ctx, inode, page);
 	return -ENOBUFS;
 }
@@ -145,7 +145,7 @@  static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx,
 					     struct list_head *pages,
 					     unsigned *nr_pages)
 {
-	if (NFS_I(inode)->fscache)
+	if (nfs_i_fscache(inode))
 		return __nfs_readpages_from_fscache(ctx, inode, mapping, pages,
 						    nr_pages);
 	return -ENOBUFS;
@@ -168,7 +168,7 @@  static inline void nfs_readpage_to_fscache(struct inode *inode,
  */
 static inline void nfs_fscache_invalidate(struct inode *inode)
 {
-	fscache_invalidate(NFS_I(inode)->fscache);
+	fscache_invalidate(nfs_i_fscache(inode));
 }
 
 /*
@@ -176,7 +176,7 @@  static inline void nfs_fscache_invalidate(struct inode *inode)
  */
 static inline void nfs_fscache_wait_on_invalidate(struct inode *inode)
 {
-	fscache_wait_on_invalidate(NFS_I(inode)->fscache);
+	fscache_wait_on_invalidate(nfs_i_fscache(inode));
 }
 
 /*