NFS: constify nfs_server_capable() and nfs_have_writebacks()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 18 Feb 2022 12:07:08 +0000 (07:07 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 28 Feb 2022 15:11:32 +0000 (10:11 -0500)
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
include/linux/nfs_fs.h

index 72a732a..6e10725 100644 (file)
@@ -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;
 }
 
 /*