From: Luis Henriques <lhenriques@suse.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-cachefs@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] fscache: drop fscache_cookie_put on duplicated cookies in the hash
Date: Mon, 9 Mar 2020 16:16:43 +0000 [thread overview]
Message-ID: <20200309161643.GA92486@suse.com> (raw)
When there's a collision due to a duplicate cookie, __fscache_register_netfs
will do an fscache_cookie_put. This, however, isn't required as
fscache_cookie_get hasn't been executed, and will lead to a NULL pointer as
fscache_unhash_cookie will be called.
Signed-off-by: Luis Henriques <lhenriques@suse.com>
---
fs/fscache/netfs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/fscache/netfs.c b/fs/fscache/netfs.c
index cce92216fa28..07a55371f0a4 100644
--- a/fs/fscache/netfs.c
+++ b/fs/fscache/netfs.c
@@ -52,7 +52,6 @@ int __fscache_register_netfs(struct fscache_netfs *netfs)
return 0;
already_registered:
- fscache_cookie_put(candidate, fscache_cookie_put_dup_netfs);
_leave(" = -EEXIST");
return -EEXIST;
}
next reply other threads:[~2020-03-09 16:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 16:16 Luis Henriques [this message]
2020-04-03 14:48 ` [PATCH] fscache: drop fscache_cookie_put on duplicated cookies in the hash Luis Henriques
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=20200309161643.GA92486@suse.com \
--to=lhenriques@suse.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.