summaryrefslogtreecommitdiffstats
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-07-26 20:31:26 +0200
committerSage Weil <sage@newdream.net>2011-07-26 20:31:26 +0200
commitd79698da32b317e96216236f265a9b72b78ae568 (patch)
tree97f98e83c699794d6a5d979688587fbfdbba2ba7 /fs/ceph/dir.c
parentceph: explicitly reference rename old_dentry parent dir in request (diff)
downloadlinux-d79698da32b317e96216236f265a9b72b78ae568.tar.xz
linux-d79698da32b317e96216236f265a9b72b78ae568.zip
ceph: document unlocked d_parent accesses
For the most part we don't care about racing with rename when directing MDS requests; either the old or new parent is fine. Document that, and do some minor cleanup. Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 7263f825d426..852ff8600ac9 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -506,7 +506,7 @@ int ceph_handle_snapdir(struct ceph_mds_request *req,
struct dentry *dentry, int err)
{
struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb);
- struct inode *parent = dentry->d_parent->d_inode;
+ struct inode *parent = dentry->d_parent->d_inode; /* we hold i_mutex */
/* .snap dir? */
if (err == -ENOENT &&