Commit d0fb31ec authored by David Howells's avatar David Howells

fscache: Detect multiple relinquishment of a cookie

Report if an fscache cookie is relinquished multiple times by the netfs.
Signed-off-by: default avatarDavid <dhowells@redhat.com>
parent b27ddd46
......@@ -602,7 +602,8 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire)
atomic_read(&cookie->n_active), retire);
/* No further netfs-accessing operations on this cookie permitted */
set_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags);
if (test_and_set_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags))
BUG();
__fscache_disable_cookie(cookie, retire);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment