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 <dwyso...@redhat.com>
---
 fs/nfs/fscache.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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));
 }
 
 /*
-- 
1.8.3.1

--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs

Reply via email to