aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2014-12-10 03:17:31 -0500
committerIlya Dryomov <idryomov@redhat.com>2014-12-17 12:09:53 -0500
commit275dd19ea4e84c34f985ba097f9cddb539f54a50 (patch)
tree2006c149b55ade7a1466bc82882433448191ba38 /fs/ceph
parent021b77bee210843bed1ea91b5cad58235ff9c8e5 (diff)
ceph: fix mksnap crash
mksnap reply only contain 'target', does not contain 'dentry'. So it's wrong to use req->r_reply_info.head->is_dentry to detect traceless reply. Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 652619950fa9..fcfd0abc8c38 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -812,7 +812,9 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
812 acls.pagelist = NULL; 812 acls.pagelist = NULL;
813 } 813 }
814 err = ceph_mdsc_do_request(mdsc, dir, req); 814 err = ceph_mdsc_do_request(mdsc, dir, req);
815 if (!err && !req->r_reply_info.head->is_dentry) 815 if (!err &&
816 !req->r_reply_info.head->is_target &&
817 !req->r_reply_info.head->is_dentry)
816 err = ceph_handle_notrace_create(dir, dentry); 818 err = ceph_handle_notrace_create(dir, dentry);
817 ceph_mdsc_put_request(req); 819 ceph_mdsc_put_request(req);
818out: 820out: