Skip to content

Commit

Permalink
ceph: remove ceph_lookup_inode()
Browse files Browse the repository at this point in the history
commit 6f60f88 (ceph: fix freeing inode vs removing session caps race)
introduced ceph_lookup_inode(). But there is already a ceph_find_inode()
which provides similar function. So remove ceph_lookup_inode(), use
ceph_find_inode() instead.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Alex Elder <alex.elder@linary.org>
Reviewed-by: Sage Weil <sage@inktank.com>
  • Loading branch information
Yan, Zheng authored and Sage Weil committed Sep 6, 2013
1 parent 971f0bd commit ed284c4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino)
return inode;
}

struct inode *ceph_lookup_inode(struct super_block *sb, struct ceph_vino vino)
{
struct inode *inode;
ino_t t = ceph_vino_to_ino(vino);
inode = ilookup5_nowait(sb, t, ceph_ino_compare, &vino);
return inode;
}

/*
* get/constuct snapdir inode for a given directory
*/
Expand Down
2 changes: 1 addition & 1 deletion fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ static void remove_session_caps(struct ceph_mds_session *session)
vino = cap->ci->i_vino;
spin_unlock(&session->s_cap_lock);

inode = ceph_lookup_inode(sb, vino);
inode = ceph_find_inode(sb, vino);
iput(inode);

spin_lock(&session->s_cap_lock);
Expand Down
2 changes: 0 additions & 2 deletions fs/ceph/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,6 @@ extern void ceph_destroy_inode(struct inode *inode);

extern struct inode *ceph_get_inode(struct super_block *sb,
struct ceph_vino vino);
extern struct inode *ceph_lookup_inode(struct super_block *sb,
struct ceph_vino vino);
extern struct inode *ceph_get_snapdir(struct inode *parent);
extern int ceph_fill_file_size(struct inode *inode, int issued,
u32 truncate_seq, u64 truncate_size, u64 size);
Expand Down

0 comments on commit ed284c4

Please sign in to comment.