diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-05 11:57:58 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-07 11:50:46 -0500 |
commit | d983a32e7902da73c52e80b5dda4bc14d16415ae (patch) | |
tree | 4159d4364b90f14c8f4a1cf809acf25535a0a80e /fs/ceph/super.h | |
parent | 492f2208a8a1788569f67142cab50cc9e13be5ee (diff) |
switch inodes to rhashtableinode_work
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index a3995ebe0623..0acd007e734f 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -482,6 +482,8 @@ static inline ino_t ceph_vino_to_ino_t(struct ceph_vino vino) /* for printf-style formatting */ #define ceph_vinop(i) ceph_inode(i)->i_vino.ino, ceph_inode(i)->i_vino.snap +extern const struct rhashtable_params ceph_inode_table_params; + static inline u64 ceph_ino(struct inode *inode) { return ceph_inode(inode)->i_vino.ino; @@ -514,15 +516,15 @@ static inline u64 ceph_present_inode(struct inode *inode) return ceph_present_ino(inode->i_sb, ceph_ino(inode)); } -static inline int ceph_ino_compare(struct inode *inode, void *data) +static inline int ceph_ino_compare(const struct inode *inode, + const struct ceph_vino *pvino) { - struct ceph_vino *pvino = (struct ceph_vino *)data; struct ceph_inode_info *ci = ceph_inode(inode); + return ci->i_vino.ino == pvino->ino && ci->i_vino.snap == pvino->snap; } - static inline struct inode *ceph_find_inode(struct super_block *sb, struct ceph_vino vino) { @@ -531,7 +533,7 @@ static inline struct inode *ceph_find_inode(struct super_block *sb, * anyway, so there is no need to squash the inode number down to * 32-bits first. Just use low-order bits on arches with 32-bit long. */ - return ilookup5(sb, (unsigned long)vino.ino, ceph_ino_compare, &vino); + return ilookup5(sb, &vino); } |