VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: NeilBrown <neilb@suse.com> 2018-10-26 17:16:29 +1100 committer: David Howells <dhowells@redhat.com> 2018-11-30 15:57:31 +0000 commit: c5a94f434c82529afda290df3235e4d85873c5b4 parent: 9a24ce5b66f9c8190d63b15f4473600db4935f1f
Commit Summary:
fscache: fix race between enablement and dropping of object
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/fs/fscache/object.c b/fs/fscache/object.c
index 9edc920f651f..6d9cb1719de5 100644
--- a/fs/fscache/object.c
+++ b/fs/fscache/object.c
@@ -730,6 +730,9 @@ static const struct fscache_state *fscache_drop_object(struct fscache_object *ob
 
 	if (awaken)
 		wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING);
+	if (test_and_clear_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags))
+		wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP);
+
 
 	/* Prevent a race with our last child, which has to signal EV_CLEARED
 	 * before dropping our spinlock.