aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-07-26 14:31:08 -0400
committerSage Weil <sage@newdream.net>2011-07-26 14:31:08 -0400
commit4f1772645296a230e04f5c53e79cfb6f841ce634 (patch)
treeb46dab3e88acef56a074c5d519a851dec5c1ade1
parente5f86dc377e7ff2b4195831153a85a3e76fefff2 (diff)
ceph: document locking for ceph_set_dentry_offset
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--fs/ceph/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index a7db56f1523b..5f0013aafa4b 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -843,11 +843,13 @@ out_unlock:
843/* 843/*
844 * Set dentry's directory position based on the current dir's max, and 844 * Set dentry's directory position based on the current dir's max, and
845 * order it in d_subdirs, so that dcache_readdir behaves. 845 * order it in d_subdirs, so that dcache_readdir behaves.
846 *
847 * Always called under directory's i_mutex.
846 */ 848 */
847static void ceph_set_dentry_offset(struct dentry *dn) 849static void ceph_set_dentry_offset(struct dentry *dn)
848{ 850{
849 struct dentry *dir = dn->d_parent; 851 struct dentry *dir = dn->d_parent;
850 struct inode *inode = dn->d_parent->d_inode; 852 struct inode *inode = dir->d_inode;
851 struct ceph_dentry_info *di; 853 struct ceph_dentry_info *di;
852 854
853 BUG_ON(!inode); 855 BUG_ON(!inode);