cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] gfs2: constify rhashtable_params
@ 2017-08-30 11:58 Arvind Yadav
  2017-08-30 13:19 ` Bob Peterson
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-30 11:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

rhashtable_params are not supposed to change at runtime. All
Functions rhashtable_* working with const rhashtable_params
provided by <linux/rhashtable.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 fs/gfs2/glock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index c38ab6c..baf3ae7 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -71,7 +71,7 @@ struct gfs2_glock_iter {
 #define GFS2_GL_HASH_SHIFT      15
 #define GFS2_GL_HASH_SIZE       BIT(GFS2_GL_HASH_SHIFT)
 
-static struct rhashtable_params ht_parms = {
+static const struct rhashtable_params ht_parms = {
 	.nelem_hint = GFS2_GL_HASH_SIZE * 3 / 4,
 	.key_len = offsetofend(struct lm_lockname, ln_type),
 	.key_offset = offsetof(struct gfs2_glock, gl_name),
-- 
1.9.1



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

* [Cluster-devel] [PATCH] gfs2: constify rhashtable_params
  2017-08-30 11:58 [Cluster-devel] [PATCH] gfs2: constify rhashtable_params Arvind Yadav
@ 2017-08-30 13:19 ` Bob Peterson
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2017-08-30 13:19 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
| rhashtable_params are not supposed to change at runtime. All
| Functions rhashtable_* working with const rhashtable_params
| provided by <linux/rhashtable.h>. So mark the non-const structs
| as const.
| 
| Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
| ---
Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=d296b15ed58231bd991c0fb0f3592d595539bcd1

Regards,

Bob Peterson
Red Hat File Systems



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

end of thread, other threads:[~2017-08-30 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 11:58 [Cluster-devel] [PATCH] gfs2: constify rhashtable_params Arvind Yadav
2017-08-30 13:19 ` Bob Peterson

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