mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
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>
This commit is contained in:
parent
d8f544c30b
commit
721d5c13a7
1 changed files with 8 additions and 4 deletions
|
@ -407,22 +407,26 @@ struct ceph_inode_info {
|
||||||
struct inode vfs_inode; /* at end */
|
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);
|
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;
|
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;
|
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;
|
return ceph_inode(inode)->i_vino;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue