summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-02-18 07:07:08 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-02-28 10:11:32 -0500
commit1a93b82c59ab45f2d9f14c47f09d2e341ff02381 (patch)
treed5dc72f6e7b23911996a10b1277d0ac24f043986
parent64cfca85bacde54caa64e0ab855c48734894fa37 (diff)
downloadlinux-1a93b82c59ab45f2d9f14c47f09d2e341ff02381.tar.bz2
NFS: constify nfs_server_capable() and nfs_have_writebacks()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--include/linux/nfs_fs.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 72a732a5103c..6e10725887d1 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -363,7 +363,7 @@ static inline void nfs_mark_for_revalidate(struct inode *inode)
spin_unlock(&inode->i_lock);
}
-static inline int nfs_server_capable(struct inode *inode, int cap)
+static inline int nfs_server_capable(const struct inode *inode, int cap)
{
return NFS_SERVER(inode)->caps & cap;
}
@@ -587,12 +587,11 @@ extern struct nfs_commit_data *nfs_commitdata_alloc(bool never_fail);
extern void nfs_commit_free(struct nfs_commit_data *data);
bool nfs_commit_end(struct nfs_mds_commit_info *cinfo);
-static inline int
-nfs_have_writebacks(struct inode *inode)
+static inline bool nfs_have_writebacks(const struct inode *inode)
{
if (S_ISREG(inode->i_mode))
return atomic_long_read(&NFS_I(inode)->nrequests) != 0;
- return 0;
+ return false;
}
/*