]>
Commit | Line | Data |
---|---|---|
445727fd GKH |
1 | From foo@baz Thu Jun 15 12:25:54 CEST 2017 |
2 | From: David Howells <dhowells@redhat.com> | |
3 | Date: Tue, 23 May 2017 21:54:06 -0400 | |
4 | Subject: FS-Cache: Initialise stores_lock in netfs cookie | |
5 | ||
6 | From: David Howells <dhowells@redhat.com> | |
7 | ||
8 | ||
9 | [ Upstream commit 62deb8187d116581c88c69a2dd9b5c16588545d4 ] | |
10 | ||
11 | Initialise the stores_lock in fscache netfs cookies. Technically, it | |
12 | shouldn't be necessary, since the netfs cookie is an index and stores no | |
13 | data, but initialising it anyway adds insignificant overhead. | |
14 | ||
15 | Signed-off-by: David Howells <dhowells@redhat.com> | |
16 | Reviewed-by: Jeff Layton <jlayton@redhat.com> | |
17 | Acked-by: Steve Dickson <steved@redhat.com> | |
18 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | |
19 | Signed-off-by: Sasha Levin <alexander.levin@verizon.com> | |
20 | Signed-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 */ |