[SRU X][PATCH 1/6] Revert "UBUNTU: SAUCE: CacheFiles: fix a read_waiter/read_copier race"

Daniel Axtens daniel.axtens at canonical.com
Thu Aug 2 04:18:05 UTC 2018


BugLink: https://bugs.launchpad.net/bugs/1774336

Revert 9bd2e21fbe3786e23ce8a23d3e51f1e04f1f7800 in Xenial.
Upstream has taken a different solution, which we're about to apply.

Signed-off-by: Daniel Axtens <daniel.axtens at canonical.com>
---
 fs/cachefiles/rdwr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index d9bb47d1e16d..c0f3da3926a0 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -58,9 +58,9 @@ static int cachefiles_read_waiter(wait_queue_t *wait, unsigned mode,
 
 	spin_lock(&object->work_lock);
 	list_add_tail(&monitor->op_link, &monitor->op->to_do);
-	fscache_enqueue_retrieval(monitor->op);
 	spin_unlock(&object->work_lock);
 
+	fscache_enqueue_retrieval(monitor->op);
 	return 0;
 }
 
-- 
2.17.1





More information about the kernel-team mailing list