From: Yan, Zheng Date: Wed, 10 Dec 2014 08:17:31 +0000 (+0800) Subject: ceph: fix mksnap crash X-Git-Tag: MMI-PSA29.97-13-9~10946^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=275dd19ea4e84c34f985ba097f9cddb539f54a50;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Sage Weil --- 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) acls.pagelist = NULL; } err = ceph_mdsc_do_request(mdsc, dir, req); - if (!err && !req->r_reply_info.head->is_dentry) + if (!err && + !req->r_reply_info.head->is_target && + !req->r_reply_info.head->is_dentry) err = ceph_handle_notrace_create(dir, dentry); ceph_mdsc_put_request(req); out: