1
0
Fork 0

fscache: Detect multiple relinquishment of a cookie

Report if an fscache cookie is relinquished multiple times by the netfs.

Signed-off-by: David <dhowells@redhat.com>
hifive-unleashed-5.1
David Howells 2018-04-04 13:41:26 +01:00
parent b27ddd4624
commit d0fb31ecda
1 changed files with 2 additions and 1 deletions

View File

@ -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);