Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561855 > unrolled thread

[PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie

Started byDavid Howells <dhowells@redhat.com>
First post2017-01-18 15:30 +0100
Last post2017-01-18 15:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie David Howells <dhowells@redhat.com> - 2017-01-18 15:30 +0100

#1561855 — [PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie

FromDavid Howells <dhowells@redhat.com>
Date2017-01-18 15:30 +0100
Subject[PATCH 1/2] FS-Cache: Initialise stores_lock in netfs cookie
Message-ID<t0Zpn-5cx-19@gated-at.bofh.it>
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 */

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web