diff options
author | Yan, Zheng <zyan@redhat.com> | 2014-12-10 08:17:31 (GMT) |
---|---|---|
committer | Ilya Dryomov <idryomov@redhat.com> | 2014-12-17 17:09:53 (GMT) |
commit | 275dd19ea4e84c34f985ba097f9cddb539f54a50 (patch) | |
tree | 2006c149b55ade7a1466bc82882433448191ba38 | |
parent | 021b77bee210843bed1ea91b5cad58235ff9c8e5 (diff) | |
download | linux-275dd19ea4e84c34f985ba097f9cddb539f54a50.tar.xz |
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>
-rw-r--r-- | fs/ceph/dir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 6526199..fcfd0ab 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: |