From: David Howells <dhowells@redhat.com>
To: Shyam Prasad N <nspmangalore@gmail.com>
Cc: dhowells@redhat.com, Jeff Layton <jlayton@redhat.com>,
Steve French <smfrench@gmail.com>,
CIFS <linux-cifs@vger.kernel.org>, Paulo Alcantara <pc@cjr.nz>,
linux-cachefs@redhat.com
Subject: Re: [PATCH] cifs: wait for tcon resource_id before getting fscache super
Date: Mon, 06 Dec 2021 13:52:21 +0000 [thread overview]
Message-ID: <1355654.1638798741@warthog.procyon.org.uk> (raw)
In-Reply-To: <CANT5p=qXbQU4g4VX=W9mOQo1SjMxnFGfpkLOJWgCpicyDLvt-w@mail.gmail.com>
Shyam Prasad N <nspmangalore@gmail.com> wrote:
> @@ -1376,6 +1376,13 @@ struct inode *cifs_root_iget(struct super_block *sb)
> inode = ERR_PTR(rc);
> }
>
> + /*
> + * The cookie is initialized from volume info returned above.
> + * Inside cifs_fscache_get_super_cookie it checks
> + * that we do not get super cookie twice.
> + */
> + cifs_fscache_get_super_cookie(tcon);
Ummm... Does this handle the errors correctly? What happens if rc != 0 at
this point and the inode has been marked failed? It looks like it will
abandon creation of the superblock without cleaning up the super cookie.
Maybe - or maybe it can't happen because of the:
iget_no_retry:
if (!inode) {
inode = ERR_PTR(rc);
goto out;
}
check - but then why is rc being checked?
> +
> out:
> kfree(path);
> free_xid(xid);
David
next prev parent reply other threads:[~2021-12-06 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 9:22 [PATCH] cifs: wait for tcon resource_id before getting fscache super Shyam Prasad N
2021-12-03 16:08 ` David Howells
2021-12-03 16:19 ` Steve French
2021-12-03 16:21 ` Jeff Layton
2021-12-04 2:00 ` Paulo Alcantara
2021-12-06 13:52 ` David Howells [this message]
2021-12-08 14:44 ` Shyam Prasad N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355654.1638798741@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=nspmangalore@gmail.com \
--cc=pc@cjr.nz \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox