aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2019-08-01 14:11:15 -0400
committerIlya Dryomov <idryomov@gmail.com>2019-11-25 11:44:02 +0100
commit721d5c13a7964564dbdc1524fefa7d2ef6121eee (patch)
tree01e42a171bd0b2afbcb993c46ac02b92eff6f4ff /fs/ceph
parentlibceph: drop unnecessary check from dispatch() in mon_client.c (diff)
downloadwireguard-linux-721d5c13a7964564dbdc1524fefa7d2ef6121eee.tar.xz
wireguard-linux-721d5c13a7964564dbdc1524fefa7d2ef6121eee.zip
ceph: make several helper accessors take const pointers
None of these helper functions change anything in memory, so we can declare their arguments as const. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/super.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index f98d9247f9cb..e31c0177fcc6 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -407,22 +407,26 @@ struct ceph_inode_info {
struct inode vfs_inode; /* at end */
};
-static inline struct ceph_inode_info *ceph_inode(struct inode *inode)
+static inline struct ceph_inode_info *
+ceph_inode(const struct inode *inode)
{
return container_of(inode, struct ceph_inode_info, vfs_inode);
}
-static inline struct ceph_fs_client *ceph_inode_to_client(struct inode *inode)
+static inline struct ceph_fs_client *
+ceph_inode_to_client(const struct inode *inode)
{
return (struct ceph_fs_client *)inode->i_sb->s_fs_info;
}
-static inline struct ceph_fs_client *ceph_sb_to_client(struct super_block *sb)
+static inline struct ceph_fs_client *
+ceph_sb_to_client(const struct super_block *sb)
{
return (struct ceph_fs_client *)sb->s_fs_info;
}
-static inline struct ceph_vino ceph_vino(struct inode *inode)
+static inline struct ceph_vino
+ceph_vino(const struct inode *inode)
{
return ceph_inode(inode)->i_vino;
}