]> Pileus Git - ~andy/linux/commit
ceph: use I_COMPLETE inode flag instead of D_COMPLETE flag
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 18 Feb 2013 08:38:14 +0000 (16:38 +0800)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:14:33 +0000 (21:14 -0700)
commita8673d61ad77ddf2118599507bd40cc345e95368
tree0b8688fee3c2f6c7c35db75d42edd806df689d1d
parent964266cce94cee7e4aca42994fcda206c111e917
ceph: use I_COMPLETE inode flag instead of D_COMPLETE flag

commit c6ffe10015 moved the flag that tracks if the dcache contents
for a directory are complete to dentry. The problem is there are
lots of places that use ceph_dir_{set,clear,test}_complete() while
holding i_ceph_lock. but ceph_dir_{set,clear,test}_complete() may
sleep because they call dput().

This patch basically reverts that commit. For ceph_d_prune(), it's
called with both the dentry to prune and the parent dentry are
locked. So it's safe to access the parent dentry's d_inode and
clear I_COMPLETE flag.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/caps.c
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/super.h