projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b27ddd4
)
fscache: Detect multiple relinquishment of a cookie
author
David Howells
<dhowells@redhat.com>
Wed, 4 Apr 2018 12:41:26 +0000
(13:41 +0100)
committer
David Howells
<dhowells@redhat.com>
Wed, 4 Apr 2018 12:41:26 +0000
(13:41 +0100)
Report if an fscache cookie is relinquished multiple times by the netfs.
Signed-off-by: David <dhowells@redhat.com>
fs/fscache/cookie.c
patch
|
blob
|
history
diff --git
a/fs/fscache/cookie.c
b/fs/fscache/cookie.c
index d705125665f07ae485f53eff67db2fef9606092f..98d22f495cd8f73a3b2ccf76a0f4801e7ffaa973 100644
(file)
--- a/
fs/fscache/cookie.c
+++ b/
fs/fscache/cookie.c
@@
-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);