]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.73/fs-cache-initialise-stores_lock-in-netfs-cookie.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.73 / fs-cache-initialise-stores_lock-in-netfs-cookie.patch
CommitLineData
445727fd
GKH
1From foo@baz Thu Jun 15 12:25:54 CEST 2017
2From: David Howells <dhowells@redhat.com>
3Date: Tue, 23 May 2017 21:54:06 -0400
4Subject: FS-Cache: Initialise stores_lock in netfs cookie
5
6From: David Howells <dhowells@redhat.com>
7
8
9[ Upstream commit 62deb8187d116581c88c69a2dd9b5c16588545d4 ]
10
11Initialise the stores_lock in fscache netfs cookies. Technically, it
12shouldn't be necessary, since the netfs cookie is an index and stores no
13data, but initialising it anyway adds insignificant overhead.
14
15Signed-off-by: David Howells <dhowells@redhat.com>
16Reviewed-by: Jeff Layton <jlayton@redhat.com>
17Acked-by: Steve Dickson <steved@redhat.com>
18Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
19Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21---
22 fs/fscache/netfs.c | 1 +
23 1 file changed, 1 insertion(+)
24
25--- a/fs/fscache/netfs.c
26+++ b/fs/fscache/netfs.c
27@@ -48,6 +48,7 @@ int __fscache_register_netfs(struct fsca
28 cookie->flags = 1 << FSCACHE_COOKIE_ENABLED;
29
30 spin_lock_init(&cookie->lock);
31+ spin_lock_init(&cookie->stores_lock);
32 INIT_HLIST_HEAD(&cookie->backing_objects);
33
34 /* check the netfs type is not already present */