From: Jos Collin Date: Mon, 29 Jan 2018 14:02:13 +0000 (+0530) Subject: client: lookup_ino when i1 becomes NULL X-Git-Tag: v13.0.2~236^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8b751d1bc2d99c685aa4e13d67b3a8429cfbc8f;p=ceph.git client: lookup_ino when i1 becomes NULL Also set FUSE_CAP_EXPORT_SUPPORT Fixes: http://tracker.ceph.com/issues/21995 Signed-off-by: Jos Collin --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 127e0ea9cee8..a01f39c238fd 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -161,6 +161,15 @@ static void fuse_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name) UserPerm perms(ctx->uid, ctx->gid); GET_GROUPS(perms, req); + if (!i1) + { + r = cfuse->client->lookup_ino(parent, perms, &i1); + if (r < 0) { + fuse_reply_err(req, -r); + return; + } + } + memset(&fe, 0, sizeof(fe)); r = cfuse->client->ll_lookup(i1, name, &fe.attr, &i2, perms); if (r >= 0) { @@ -945,6 +954,8 @@ static void do_init(void *data, fuse_conn_info *conn) if(conn->capable & FUSE_CAP_DONT_MASK) conn->want |= FUSE_CAP_DONT_MASK; } + if(conn->capable & FUSE_CAP_EXPORT_SUPPORT) + conn->want |= FUSE_CAP_EXPORT_SUPPORT; #endif if (cfuse->fd_on_success) {