linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie
@ 2017-01-18 14:29 David Howells
  2017-01-18 14:29 ` [PATCH 2/2] fscache: Clear outstanding writes when disabling a cookie David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2017-01-18 14:29 UTC (permalink / raw)
  To: viro
  Cc: Jeff Layton, Steve Dickson, linux-kernel, dhowells,
	linux-cachefs, linux-fsdevel

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>
---

 fs/fscache/netfs.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fscache/netfs.c b/fs/fscache/netfs.c
index 9b28649df3a1..a8aa00be4444 100644
--- a/fs/fscache/netfs.c
+++ b/fs/fscache/netfs.c
@@ -48,6 +48,7 @@ int __fscache_register_netfs(struct fscache_netfs *netfs)
 	cookie->flags		= 1 << FSCACHE_COOKIE_ENABLED;
 
 	spin_lock_init(&cookie->lock);
+	spin_lock_init(&cookie->stores_lock);
 	INIT_HLIST_HEAD(&cookie->backing_objects);
 
 	/* check the netfs type is not already present */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-18 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 14:29 [PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie David Howells
2017-01-18 14:29 ` [PATCH 2/2] fscache: Clear outstanding writes when disabling a cookie David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).