From nobody Wed Feb 11 18:10:13 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2001CA0EC5 for ; Mon, 11 Sep 2023 21:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344509AbjIKVOO (ORCPT ); Mon, 11 Sep 2023 17:14:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244002AbjIKSir (ORCPT ); Mon, 11 Sep 2023 14:38:47 -0400 Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89DAA1B6 for ; Mon, 11 Sep 2023 11:38:42 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C6D22801255 for ; Mon, 11 Sep 2023 18:38:41 +0000 (UTC) Received: from pdx1-sub0-mail-a294.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 69CB0801274 for ; Mon, 11 Sep 2023 18:38:41 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1694457521; a=rsa-sha256; cv=none; b=UygDGRSqtGgwT4rulVXMbhydRPB2G0JV3K6o/eDTbQ2IGfqQAufZAUgvA2dozCs5yjzhyE 4SWXBaxUW9o/DTPdHQASA6f5RHDIA+wMgLW9kp+xvbTvUtt0AY4SmL+bFrXMtnEM+QLZXa VlEHpM0KQrWlaHaXvMTKFxo429FcpeCRwE5H75AQIQh0rwHvj1cTXTUBQbUSzOiysb8F/l jphnIGGgmqwWUWdXG8DtEK9fB2QBXirR+rFfnqmpjtd830aDkpFiMWUS+SXwXK3Mc2b1SR zUQjOnDlpF3pg/wZMEcMqtjpXVtR+EiZRBYeYkeSEH/SLF1Php/cbBNA1JjS/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1694457521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FSUK8pOwpvuxQ+JLt0jdCQPxsw4/FtxlxfMUCOvi2Vo=; b=pKZNnGGhdxQEPbNjq2v1M6fXpEW0nv0STxj5uhPzgJaYN+VZ6Gs86cEeJnGTR6pH6BmFqk QNTCAe0q3vJm0Le41xAlxG2f2oiezfLY8dlF8HOJ1a0Hlf52FlztEh4C6u2Wln5xWog9Oi CjAfU2SIYqjNuO2COGSuw0Iq1LzBIRNVmySuES/wF3VUA1gCqob7WHMOzJlD1+zsuBBvuU 561yMRq42IvwzKdeV/50XTorWt+Mfv421rgcGk0saIDZmweZaNJSmbiiwNl+zSu8vobUSK 9bU5qjKroAevdrcvB2fL406lNd3M74EBUpPkWKayxetFainbk+NWqKO1sNBK2g== ARC-Authentication-Results: i=1; rspamd-7c449d4847-xt9p6; auth=pass smtp.auth=dreamhost smtp.mailfrom=kjlx@templeofstupid.com X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|kjlx@templeofstupid.com X-MailChannels-Auth-Id: dreamhost X-Drop-Slimy: 02cb74bf125744cc_1694457521667_815134810 X-MC-Loop-Signature: 1694457521667:2706943314 X-MC-Ingress-Time: 1694457521667 Received: from pdx1-sub0-mail-a294.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.117.103.156 (trex/6.9.1); Mon, 11 Sep 2023 18:38:41 +0000 Received: from kmjvbox (c-73-231-176-24.hsd1.ca.comcast.net [73.231.176.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kjlx@templeofstupid.com) by pdx1-sub0-mail-a294.dreamhost.com (Postfix) with ESMTPSA id 4RkwTY1P16zJp for ; Mon, 11 Sep 2023 11:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=templeofstupid.com; s=dreamhost; t=1694457521; bh=FSUK8pOwpvuxQ+JLt0jdCQPxsw4/FtxlxfMUCOvi2Vo=; h=Date:From:To:Cc:Subject:Content-Type; b=eLwToKe9t9/l6uyz4YUCl6xOhB4/7ZyDAweU7Jz4u/ulkpHnakUSCJU4WryiTG92u vzjJO7ofzGfXcxHina7YbbZ1vXedBZ5COGZ8mNe1jzMTN0DGxZOr6+NT7O8kJalfV+ 9b6a56/e+TNXhUhITfG6LXW2/1dGsFNdXPNUZQAjXZHB3vDrHbCNhMDCi1mQLuyzy+ ot0uaQIFb+MZj5fW6WefrRCWjm6dtVSPDFwCnPWHXYXKd7BQ/MWtaotbDFKFl+TX8k YnjOo+1zCx8aSBPPnL+R+sXspSanqwvq5sGOEb7mI3y7x/c9t96qOZliZhe0yt/bdY qBWu9iBCjufnw== Received: from johansen (uid 1000) (envelope-from kjlx@templeofstupid.com) id e00c8 by kmjvbox (DragonFly Mail Agent v0.12); Mon, 11 Sep 2023 11:38:38 -0700 Date: Mon, 11 Sep 2023 11:38:38 -0700 From: Krister Johansen To: Miklos Szeredi , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, German Maglione , Greg Kurz , Max Reitz Subject: [PATCH 1/2] fuse: revalidate: move lookup into a separate function Message-ID: <9a2b0c5b625cd88c561289bf7d4d7dfe305c10ed.1693440240.git.kjlx@templeofstupid.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" If this refactoring seems cumbersome, it's because the goal is to move the lookup parts of fuse_dentry_revalidate into a common function. This function will be used in a subsequent commit. In the meantime, the new function fuse_dentry_revalidate_lookup is responsible for just the lookup and validation portions of the revalidate dance. The fuse_dentry_revalidate function retains the responsibility for invalidating and mutating any state associated with the origial fuse_inode and dentry. Cc: stable@vger.kernel.org Fixes: 1866d779d5d2 ("fuse: Allow fuse_fill_super_common() for submounts") Signed-off-by: Krister Johansen --- fs/fuse/dir.c | 87 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 27 deletions(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index e190d09f220d..afbdd223b0f3 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -183,6 +183,59 @@ static void fuse_lookup_init(struct fuse_conn *fc, str= uct fuse_args *args, args->out_args[0].value =3D outarg; } =20 +static int fuse_dentry_revalidate_lookup(struct fuse_mount *fm, + struct dentry *entry, + struct inode *inode, + struct fuse_entry_out *outarg, + bool *lookedup) +{ + struct dentry *parent; + struct fuse_forget_link *forget; + struct fuse_inode *fi; + FUSE_ARGS(args); + int ret; + + forget =3D fuse_alloc_forget(); + ret =3D -ENOMEM; + if (!forget) + goto out; + + parent =3D dget_parent(entry); + fuse_lookup_init(fm->fc, &args, get_node_id(d_inode(parent)), + &entry->d_name, outarg); + ret =3D fuse_simple_request(fm, &args); + dput(parent); + + /* Zero nodeid is same as -ENOENT */ + if (!ret && !outarg->nodeid) + ret =3D -ENOENT; + if (!ret) { + fi =3D get_fuse_inode(inode); + if (outarg->nodeid !=3D get_node_id(inode) || + (bool) IS_AUTOMOUNT(inode) !=3D (bool) (outarg->attr.flags & FUSE_AT= TR_SUBMOUNT)) { + fuse_queue_forget(fm->fc, forget, + outarg->nodeid, 1); + goto invalid; + } + *lookedup =3D true; + } + kfree(forget); + if (ret =3D=3D -ENOMEM || ret =3D=3D -EINTR) + goto out; + if (ret || fuse_invalid_attr(&outarg->attr) || + fuse_stale_inode(inode, outarg->generation, &outarg->attr)) { + goto invalid; + } + + ret =3D 1; +out: + return ret; + +invalid: + ret =3D 0; + goto out; +} + /* * Check whether the dentry is still valid * @@ -206,9 +259,8 @@ static int fuse_dentry_revalidate(struct dentry *entry,= unsigned int flags) else if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) || (flags & (LOOKUP_EXCL | LOOKUP_REVAL | LOOKUP_RENAME_TARGET))) { struct fuse_entry_out outarg; - FUSE_ARGS(args); - struct fuse_forget_link *forget; u64 attr_version; + bool lookedup =3D false; =20 /* For negative dentries, always do a fresh lookup */ if (!inode) @@ -220,38 +272,19 @@ static int fuse_dentry_revalidate(struct dentry *entr= y, unsigned int flags) =20 fm =3D get_fuse_mount(inode); =20 - forget =3D fuse_alloc_forget(); - ret =3D -ENOMEM; - if (!forget) - goto out; - attr_version =3D fuse_get_attr_version(fm->fc); =20 - parent =3D dget_parent(entry); - fuse_lookup_init(fm->fc, &args, get_node_id(d_inode(parent)), - &entry->d_name, &outarg); - ret =3D fuse_simple_request(fm, &args); - dput(parent); - /* Zero nodeid is same as -ENOENT */ - if (!ret && !outarg.nodeid) - ret =3D -ENOENT; - if (!ret) { + ret =3D fuse_dentry_revalidate_lookup(fm, entry, inode, &outarg, + &lookedup); + if (ret =3D=3D -ENOMEM || ret =3D=3D -EINTR) + goto out; + if (lookedup) { fi =3D get_fuse_inode(inode); - if (outarg.nodeid !=3D get_node_id(inode) || - (bool) IS_AUTOMOUNT(inode) !=3D (bool) (outarg.attr.flags & FUSE_AT= TR_SUBMOUNT)) { - fuse_queue_forget(fm->fc, forget, - outarg.nodeid, 1); - goto invalid; - } spin_lock(&fi->lock); fi->nlookup++; spin_unlock(&fi->lock); } - kfree(forget); - if (ret =3D=3D -ENOMEM || ret =3D=3D -EINTR) - goto out; - if (ret || fuse_invalid_attr(&outarg.attr) || - fuse_stale_inode(inode, outarg.generation, &outarg.attr)) + if (ret <=3D 0) goto invalid; =20 forget_all_cached_acls(inode); --=20 2.25.1 From nobody Wed Feb 11 18:10:13 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92C37CA0EC6 for ; Mon, 11 Sep 2023 22:46:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241086AbjIKWjx (ORCPT ); Mon, 11 Sep 2023 18:39:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244006AbjIKSjD (ORCPT ); Mon, 11 Sep 2023 14:39:03 -0400 Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED461AD for ; Mon, 11 Sep 2023 11:38:58 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2767F50101B for ; Mon, 11 Sep 2023 18:38:58 +0000 (UTC) Received: from pdx1-sub0-mail-a294.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BCA2A501A5C for ; Mon, 11 Sep 2023 18:38:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1694457537; a=rsa-sha256; cv=none; b=m2+9EgBWXyx7EKIlsP0u0YaQ9ds+GKlK48Nv4BCUZUW/3StuGahE+s5kEuphkNCKil14Co 6f3Jj346s8JYU/FDSNBEIPbrfpRJYecz6Er8kyUHdhjDuyLTV5Ingee6agDORIOxJ8GldV nHhauFwE9upUCaREMkMOOjdQqbiu9CgX7dbGv1eiKLsXaQlcwFioejOlanfftjwFug0T3D JEOW2ZSw3Sbzt5BMegMRTO5gTTFItKHTzXNUkgCNDrmaYcqFnTik9nz/sQmvg2KsDoOm57 yXh77nPFheEcMH0wUohZXZBbQw8l+6Na0jBE3H97vTww8MWBBS7GSDvQHJbHzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1694457537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=x5eKf/3bpwwZrGrVqo6lwbtBUJZWR7VnhoHkdzXsdKA=; b=BydvSVKUTIgbaCDE+80xwhmAz1+mmsiePzig/OhInlZfVjglXPGwfN5B5X4qto72LtmUla l6dfAbWGFa0aC/O12c5YA/3164XXgv9ZiTvRsR5wHfDxJdFUlafx2suMYB9jKcCM2YEvp9 +Zvw/FkHd53F1vVBWm3tGJ1uTrkNBQuqtR/R7ph8TFGRziO47XxdzxtcnCrpRe+dHObHiH Tigju4Vc9MCkUNv45gzH0faD7/UAgRLfQ5s1sbaLUJt0mcFhgCfGhBo3uWhCBa6Dakh+Bf 6dQTwxNLnc4w4u30ww8uuZIEV7E69Vp+Li9xR888InpBYRUCJaAgfDuiNr95lg== ARC-Authentication-Results: i=1; rspamd-7d5dc8fd68-9t89p; auth=pass smtp.auth=dreamhost smtp.mailfrom=kjlx@templeofstupid.com X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|kjlx@templeofstupid.com X-MailChannels-Auth-Id: dreamhost X-Grain-Continue: 01bd96a316e3680c_1694457537979_2876645192 X-MC-Loop-Signature: 1694457537979:2690535189 X-MC-Ingress-Time: 1694457537978 Received: from pdx1-sub0-mail-a294.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.119.184.198 (trex/6.9.1); Mon, 11 Sep 2023 18:38:57 +0000 Received: from kmjvbox (c-73-231-176-24.hsd1.ca.comcast.net [73.231.176.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kjlx@templeofstupid.com) by pdx1-sub0-mail-a294.dreamhost.com (Postfix) with ESMTPSA id 4RkwTs0tvwzb9 for ; Mon, 11 Sep 2023 11:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=templeofstupid.com; s=dreamhost; t=1694457537; bh=x5eKf/3bpwwZrGrVqo6lwbtBUJZWR7VnhoHkdzXsdKA=; h=Date:From:To:Cc:Subject:Content-Type; b=oVQT3mbUqbwnEUwuo5trSBSUtzfLzK9YloTjzb1vG9clZk1W85Q/uO7B2MN7yEJI7 HEJ+UlzZiKWtI5YQOidmTXqT/0EITVvkP40HCdlSnwWQdMWvvZsPiNoMDcrCFn2zSw LSHkgpBKiCDbpwoswcKLCmxHWBiNDpn1KQCaqhcKS/bPVuvfD98gvVikn+A3gpNovq tcJ7ACXKVfTorRq0fKnqll1RQBlX7LEnC3Tw2PQymoMg0AJ96hHzBnRyvwNiNWM9cd DoF0jA+yNHBRi7S0kY6FSWOuyyZvSbtV/DD6kETKgbu+o7rcXqatFWtc/PYNdYx6KN M9Jiac0KB5dSA== Received: from johansen (uid 1000) (envelope-from kjlx@templeofstupid.com) id e00c8 by kmjvbox (DragonFly Mail Agent v0.12); Mon, 11 Sep 2023 11:38:54 -0700 Date: Mon, 11 Sep 2023 11:38:54 -0700 From: Krister Johansen To: Miklos Szeredi , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, German Maglione , Greg Kurz , Max Reitz Subject: [PATCH 2/2] fuse: ensure that submounts lookup their root Message-ID: <03b9823cf9a3db9da085f1e9282f19959e1672bc.1693440240.git.kjlx@templeofstupid.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Prior to this commit, the submount code assumed that the inode for the root filesystem could not be evicted. When eviction occurs the server may forget the inode. This author has observed a submount get an EBADF from a virtiofsd server that resulted from the sole dentry / inode pair getting evicted from a mount namespace and superblock where they were originally referenced. The dentry shrinker triggered a forget after killing the dentry with the last reference. As a result, a container that was also using this submount failed to access its filesystem because it had borrowed the reference instead of taking its own when setting up its superblock for the submount. Fix by ensuring that submount superblock configuration looks up the nodeid for the submount as well. Cc: stable@vger.kernel.org Fixes: 1866d779d5d2 ("fuse: Allow fuse_fill_super_common() for submounts") Signed-off-by: Krister Johansen --- fs/fuse/dir.c | 10 +++++----- fs/fuse/fuse_i.h | 6 ++++++ fs/fuse/inode.c | 43 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index afbdd223b0f3..37dd4800aa21 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -183,11 +183,11 @@ static void fuse_lookup_init(struct fuse_conn *fc, st= ruct fuse_args *args, args->out_args[0].value =3D outarg; } =20 -static int fuse_dentry_revalidate_lookup(struct fuse_mount *fm, - struct dentry *entry, - struct inode *inode, - struct fuse_entry_out *outarg, - bool *lookedup) +int fuse_dentry_revalidate_lookup(struct fuse_mount *fm, + struct dentry *entry, + struct inode *inode, + struct fuse_entry_out *outarg, + bool *lookedup) { struct dentry *parent; struct fuse_forget_link *forget; diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index bf0b85d0b95c..f8ba293d5d30 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1325,6 +1325,12 @@ void fuse_dax_dontcache(struct inode *inode, unsigne= d int flags); bool fuse_dax_check_alignment(struct fuse_conn *fc, unsigned int map_align= ment); void fuse_dax_cancel_work(struct fuse_conn *fc); =20 +/* dir.c */ +int fuse_dentry_revalidate_lookup(struct fuse_mount *fm, struct dentry *en= try, + struct inode *inode, + struct fuse_entry_out *outarg, + bool *lookedup); + /* ioctl.c */ long fuse_file_ioctl(struct file *file, unsigned int cmd, unsigned long ar= g); long fuse_file_compat_ioctl(struct file *file, unsigned int cmd, diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index d47606206ec3..b3e7b0a397ae 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1464,7 +1464,13 @@ static int fuse_fill_super_submount(struct super_blo= ck *sb, struct fuse_mount *fm =3D get_fuse_mount_super(sb); struct super_block *parent_sb =3D parent_fi->inode.i_sb; struct fuse_attr root_attr; + struct fuse_inode *fi; struct inode *root; + struct inode *parent; + struct dentry *pdent; + struct fuse_entry_out outarg; + bool lookedup =3D false; + int ret; =20 fuse_sb_defaults(sb); fm->sb =3D sb; @@ -1480,14 +1486,39 @@ static int fuse_fill_super_submount(struct super_bl= ock *sb, if (parent_sb->s_subtype && !sb->s_subtype) return -ENOMEM; =20 - fuse_fill_attr_from_inode(&root_attr, parent_fi); - root =3D fuse_iget(sb, parent_fi->nodeid, 0, &root_attr, 0, 0); /* - * This inode is just a duplicate, so it is not looked up and - * its nlookup should not be incremented. fuse_iget() does - * that, though, so undo it here. + * It is necessary to lookup the parent_if->nodeid in case the dentry + * that triggered the automount of the submount is later evicted. + * If this dentry is evicted without the lookup count getting increased + * on the submount root, then the server can subsequently forget this + * nodeid which leads to errors when trying to access the root of the + * submount. */ - get_fuse_inode(root)->nlookup--; + parent =3D &parent_fi->inode; + pdent =3D d_find_alias(parent); + if (!pdent) + return -EINVAL; + + ret =3D fuse_dentry_revalidate_lookup(fm, pdent, parent, &outarg, + &lookedup); + dput(pdent); + /* + * The new root owns this nlookup on success, and it is incremented by + * fuse_iget(). In the case the lookup succeeded but revalidate fails, + * ensure that the lookup count is tracked by the parent. + */ + if (ret <=3D 0) { + if (lookedup) { + fi =3D get_fuse_inode(parent); + spin_lock(&fi->lock); + fi->nlookup++; + spin_unlock(&fi->lock); + } + return ret ? ret : -EINVAL; + } + + fuse_fill_attr_from_inode(&root_attr, parent_fi); + root =3D fuse_iget(sb, parent_fi->nodeid, 0, &root_attr, 0, 0); sb->s_d_op =3D &fuse_dentry_operations; sb->s_root =3D d_make_root(root); if (!sb->s_root) --=20 2.25.1