Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1723235 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-30 14:00 +0200 |
| Last post | 2017-08-30 15:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] gfs2: constify rhashtable_params Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-30 14:00 +0200
Re: [PATCH] gfs2: constify rhashtable_params Bob Peterson <rpeterso@redhat.com> - 2017-08-30 15:20 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-30 14:00 +0200 |
| Subject | [PATCH] gfs2: constify rhashtable_params |
| Message-ID | <uk9P4-7OL-15@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Bob Peterson <rpeterso@redhat.com> |
|---|---|
| Date | 2017-08-30 15:20 +0200 |
| Message-ID | <ukb4u-li-23@gated-at.bofh.it> |
| In reply to | #1723235 |
----- 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web