aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-07-24 12:22:11 +0800
committerSage Weil <sage@inktank.com>2013-08-09 17:55:32 -0700
commit6f60f889470aecf747610279545c054a99aadca3 (patch)
tree60f5781c7673d1d0e06ef1b658e652b2738daf24 /fs/ceph/super.h
parentceph: WQ_NON_REENTRANT is meaningless and going away (diff)
downloadlinux-dev-6f60f889470aecf747610279545c054a99aadca3.tar.xz
linux-dev-6f60f889470aecf747610279545c054a99aadca3.zip
ceph: fix freeing inode vs removing session caps race
remove_session_caps() uses iterate_session_caps() to remove caps, but iterate_session_caps() skips inodes that are being deleted. So session->s_nr_caps can be non-zero after iterate_session_caps() return. We can fix the issue by waiting until deletions are complete. __wait_on_freeing_inode() is designed for the job, but it is not exported, so we use lookup inode function to access it. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index cbded572345e..afcd62a68916 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -677,6 +677,8 @@ 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);