From: Dave Wysochanski <dwysocha@redhat.com>
To: Trond Myklebust <trondmy@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
David Howells <dhowells@redhat.com>
Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org
Subject: [PATCH v2 1/7] NFS: Use nfs_i_fscache() consistently within NFS fscache code
Date: Thu, 7 Oct 2021 18:30:17 -0400 [thread overview]
Message-ID: <1633645823-31235-2-git-send-email-dwysocha@redhat.com> (raw)
In-Reply-To: <1633645823-31235-1-git-send-email-dwysocha@redhat.com>
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 --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index 679055720dae..f4deea2908e9 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -105,7 +105,7 @@ extern void __nfs_read_completion_to_fscache(struct nfs_pgio_header *hdr,
static inline int nfs_readpage_from_fscache(struct inode *inode,
struct page *page)
{
- if (NFS_I(inode)->fscache)
+ if (nfs_i_fscache(inode))
return __nfs_readpage_from_fscache(inode, page);
return -ENOBUFS;
}
@@ -117,7 +117,7 @@ static inline int nfs_readpage_from_fscache(struct inode *inode,
static inline void nfs_readpage_to_fscache(struct inode *inode,
struct page *page)
{
- if (NFS_I(inode)->fscache)
+ if (nfs_i_fscache(inode))
__nfs_readpage_to_fscache(inode, page);
}
@@ -126,7 +126,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));
}
/*
@@ -134,7 +134,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
next prev parent reply other threads:[~2021-10-07 22:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 22:30 [PATCH v2 0/7] Various NFS fscache cleanups Dave Wysochanski
2021-10-07 22:30 ` Dave Wysochanski [this message]
2021-10-07 22:30 ` [PATCH v2 2/7] NFS: Cleanup usage of nfs_inode in fscache interface and handle i_size properly Dave Wysochanski
2021-10-07 22:30 ` [PATCH v2 3/7] NFS: Convert NFS fscache enable/disable dfprintks to tracepoints Dave Wysochanski
2021-10-07 22:30 ` [PATCH v2 4/7] NFS: Rename fscache read and write pages functions Dave Wysochanski
2021-10-07 22:30 ` [PATCH v2 5/7] NFS: Replace dfprintks with tracepoints in read and write page functions Dave Wysochanski
2021-10-07 22:30 ` [PATCH v2 6/7] NFS: Remove remaining dfprintks related to fscache cookies Dave Wysochanski
2021-10-07 22:30 ` [PATCH v2 7/7] NFS: Remove remaining usages of NFSDBG_FSCACHE Dave Wysochanski
2021-10-13 15:41 ` [PATCH v2 0/7] Various NFS fscache cleanups David Wysochanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1633645823-31235-2-git-send-email-dwysocha@redhat.com \
--to=dwysocha@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox