From: Sage Weil Date: Tue, 26 Jul 2011 18:31:08 +0000 (-0700) Subject: ceph: document locking for ceph_set_dentry_offset X-Git-Tag: v3.1-rc6~16^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f1772645296a230e04f5c53e79cfb6f841ce634;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ceph: document locking for ceph_set_dentry_offset Reviewed-by: Yehuda Sadeh Signed-off-by: Sage Weil --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index a7db56f..5f0013a 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -843,11 +843,13 @@ out_unlock: /* * Set dentry's directory position based on the current dir's max, and * order it in d_subdirs, so that dcache_readdir behaves. + * + * Always called under directory's i_mutex. */ static void ceph_set_dentry_offset(struct dentry *dn) { struct dentry *dir = dn->d_parent; - struct inode *inode = dn->d_parent->d_inode; + struct inode *inode = dir->d_inode; struct ceph_dentry_info *di; BUG_ON(!inode);