diff options
author | Sage Weil <sage@newdream.net> | 2011-07-26 20:31:08 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-07-26 20:31:08 +0200 |
commit | 4f1772645296a230e04f5c53e79cfb6f841ce634 (patch) | |
tree | b46dab3e88acef56a074c5d519a851dec5c1ade1 /fs | |
parent | ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug (diff) | |
download | linux-4f1772645296a230e04f5c53e79cfb6f841ce634.tar.xz linux-4f1772645296a230e04f5c53e79cfb6f841ce634.zip |
ceph: document locking for ceph_set_dentry_offset
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/inode.c | 4 |
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: /* * 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); |