All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter
@ 2017-03-06 14:37 Andreas Gruenbacher
  2017-03-06 14:37 ` [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open Andreas Gruenbacher
  2017-03-09 15:06 ` [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Bob Peterson
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Gruenbacher @ 2017-03-06 14:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Function rhashtable_walk_init is deprecated.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.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 ec0848f..339deb4 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1932,7 +1932,7 @@ static int gfs2_glocks_open(struct inode *inode, struct file *file)
 		if (seq->buf)
 			seq->size = GFS2_SEQ_GOODSIZE;
 		gi->gl = NULL;
-		ret = rhashtable_walk_init(&gl_hash_table, &gi->hti, GFP_KERNEL);
+		rhashtable_walk_enter(&gl_hash_table, &gi->hti);
 	}
 	return ret;
 }
-- 
2.7.4



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

* [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open
  2017-03-06 14:37 [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Andreas Gruenbacher
@ 2017-03-06 14:37 ` Andreas Gruenbacher
  2017-03-09 15:07   ` Bob Peterson
  2017-03-09 15:06 ` [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Bob Peterson
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Gruenbacher @ 2017-03-06 14:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Both functions are identical except for the seq_operations used.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/gfs2/glock.c | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 339deb4..2cbc11b 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1918,10 +1918,10 @@ static const struct seq_operations gfs2_sbstats_seq_ops = {
 
 #define GFS2_SEQ_GOODSIZE min(PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER, 65536UL)
 
-static int gfs2_glocks_open(struct inode *inode, struct file *file)
+static int __gfs2_glocks_open(struct inode *inode, struct file *file,
+			      const struct seq_operations *ops)
 {
-	int ret = seq_open_private(file, &gfs2_glock_seq_ops,
-				   sizeof(struct gfs2_glock_iter));
+	int ret = seq_open_private(file, ops, sizeof(struct gfs2_glock_iter));
 	if (ret == 0) {
 		struct seq_file *seq = file->private_data;
 		struct gfs2_glock_iter *gi = seq->private;
@@ -1937,6 +1937,11 @@ static int gfs2_glocks_open(struct inode *inode, struct file *file)
 	return ret;
 }
 
+static int gfs2_glocks_open(struct inode *inode, struct file *file)
+{
+	return __gfs2_glocks_open(inode, file, &gfs2_glock_seq_ops);
+}
+
 static int gfs2_glocks_release(struct inode *inode, struct file *file)
 {
 	struct seq_file *seq = file->private_data;
@@ -1949,20 +1954,7 @@ static int gfs2_glocks_release(struct inode *inode, struct file *file)
 
 static int gfs2_glstats_open(struct inode *inode, struct file *file)
 {
-	int ret = seq_open_private(file, &gfs2_glstats_seq_ops,
-				   sizeof(struct gfs2_glock_iter));
-	if (ret == 0) {
-		struct seq_file *seq = file->private_data;
-		struct gfs2_glock_iter *gi = seq->private;
-		gi->sdp = inode->i_private;
-		gi->last_pos = 0;
-		seq->buf = kmalloc(GFS2_SEQ_GOODSIZE, GFP_KERNEL | __GFP_NOWARN);
-		if (seq->buf)
-			seq->size = GFS2_SEQ_GOODSIZE;
-		gi->gl = NULL;
-		ret = rhashtable_walk_init(&gl_hash_table, &gi->hti, GFP_KERNEL);
-	}
-	return ret;
+	return __gfs2_glocks_open(inode, file, &gfs2_glstats_seq_ops);
 }
 
 static int gfs2_sbstats_open(struct inode *inode, struct file *file)
-- 
2.7.4



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

* [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter
  2017-03-06 14:37 [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Andreas Gruenbacher
  2017-03-06 14:37 ` [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open Andreas Gruenbacher
@ 2017-03-09 15:06 ` Bob Peterson
  1 sibling, 0 replies; 4+ messages in thread
From: Bob Peterson @ 2017-03-09 15:06 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
| Function rhashtable_walk_init is deprecated.
| 
| Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
| ---

Hi,

Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next&id=7209c60c5c17a1e93363fc18714dedbb2197f260

Regards,

Bob Peterson
Red Hat File Systems



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

* [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open
  2017-03-06 14:37 ` [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open Andreas Gruenbacher
@ 2017-03-09 15:07   ` Bob Peterson
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Peterson @ 2017-03-09 15:07 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
| Both functions are identical except for the seq_operations used.
| 
| Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
| ---

Hi,

Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/?h=for-next&id=8b43b0891e394098304195c34d7498bfef51f520

Regards,

Bob Peterson
Red Hat File Systems



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

end of thread, other threads:[~2017-03-09 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-06 14:37 [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Andreas Gruenbacher
2017-03-06 14:37 ` [Cluster-devel] [PATCH 2/2] gfs2: Deduplicate gfs2_{glocks, glstats}_open Andreas Gruenbacher
2017-03-09 15:07   ` Bob Peterson
2017-03-09 15:06 ` [Cluster-devel] [PATCH 1/2] gfs2: Replace rhashtable_walk_init with rhashtable_walk_enter Bob Peterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.