Skip to content

Commit 95a4659

Browse files
dhowellsgregkh
authored andcommitted
FS-Cache: Initialise stores_lock in netfs cookie
[ Upstream commit 62deb8187d116581c88c69a2dd9b5c16588545d4 ] Initialise the stores_lock in fscache netfs cookies. Technically, it shouldn't be necessary, since the netfs cookie is an index and stores no data, but initialising it anyway adds insignificant overhead. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 38481d7 commit 95a4659

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/fscache/netfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ int __fscache_register_netfs(struct fscache_netfs *netfs)
4848
cookie->flags = 1 << FSCACHE_COOKIE_ENABLED;
4949

5050
spin_lock_init(&cookie->lock);
51+
spin_lock_init(&cookie->stores_lock);
5152
INIT_HLIST_HEAD(&cookie->backing_objects);
5253

5354
/* check the netfs type is not already present */

0 commit comments

Comments
 (0)