public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 01/10] kobject: introduce kobject_del_and_put()
@ 2023-03-19  8:41 Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki; +Cc: Yangtao Li, linux-kernel

There are plenty of using kobject_del() and kobject_put() together
in the kernel tree. This patch wraps these two calls in a single helper.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
v2:
-add kobject_del_and_put() users
 include/linux/kobject.h |  1 +
 lib/kobject.c           | 17 +++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index bdab370a24f4..782d4bd119f8 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -111,6 +111,7 @@ extern struct kobject *kobject_get(struct kobject *kobj);
 extern struct kobject * __must_check kobject_get_unless_zero(
 						struct kobject *kobj);
 extern void kobject_put(struct kobject *kobj);
+extern void kobject_del_and_put(struct kobject *kobj);
 
 extern const void *kobject_namespace(const struct kobject *kobj);
 extern void kobject_get_ownership(const struct kobject *kobj,
diff --git a/lib/kobject.c b/lib/kobject.c
index 6e2f0bee3560..8c0293e37214 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -731,6 +731,20 @@ void kobject_put(struct kobject *kobj)
 }
 EXPORT_SYMBOL(kobject_put);
 
+/**
+ * kobject_del_and_put() - Delete kobject.
+ * @kobj: object.
+ *
+ * Unlink kobject from hierarchy and decrement the refcount.
+ * If refcount is 0, call kobject_cleanup().
+ */
+void kobject_del_and_put(struct kobject *kobj)
+{
+	kobject_del(kobj);
+	kobject_put(kobj);
+}
+EXPORT_SYMBOL_GPL(kobject_del_and_put);
+
 static void dynamic_kobj_release(struct kobject *kobj)
 {
 	pr_debug("kobject: (%p): %s\n", kobj, __func__);
@@ -874,8 +888,7 @@ void kset_unregister(struct kset *k)
 {
 	if (!k)
 		return;
-	kobject_del(&k->kobj);
-	kobject_put(&k->kobj);
+	kobject_del_and_put(&k->kobj);
 }
 EXPORT_SYMBOL(kset_unregister);
 
-- 
2.35.1


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

* [PATCH v2 02/10] f2fs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 03/10] erofs: " Yangtao Li
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: Yangtao Li, linux-f2fs-devel, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/sysfs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455afc12cfc 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1478,14 +1478,11 @@ void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi)
 		remove_proc_entry(sbi->sb->s_id, f2fs_proc_root);
 	}
 
-	kobject_del(&sbi->s_stat_kobj);
-	kobject_put(&sbi->s_stat_kobj);
+	kobject_del_and_put(&sbi->s_stat_kobj);
 	wait_for_completion(&sbi->s_stat_kobj_unregister);
-	kobject_del(&sbi->s_feature_list_kobj);
-	kobject_put(&sbi->s_feature_list_kobj);
+	kobject_del_and_put(&sbi->s_feature_list_kobj);
 	wait_for_completion(&sbi->s_feature_list_kobj_unregister);
 
-	kobject_del(&sbi->s_kobj);
-	kobject_put(&sbi->s_kobj);
+	kobject_del_and_put(&sbi->s_kobj);
 	wait_for_completion(&sbi->s_kobj_unregister);
 }
-- 
2.35.1


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

* [PATCH v2 03/10] erofs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 04/10] zonefs: " Yangtao Li
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Gao Xiang, Chao Yu, Yue Hu, Jeffle Xu
  Cc: Yangtao Li, linux-erofs, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/erofs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c
index 435e515c0792..9ed7d6552155 100644
--- a/fs/erofs/sysfs.c
+++ b/fs/erofs/sysfs.c
@@ -241,8 +241,7 @@ void erofs_unregister_sysfs(struct super_block *sb)
 	struct erofs_sb_info *sbi = EROFS_SB(sb);
 
 	if (sbi->s_kobj.state_in_sysfs) {
-		kobject_del(&sbi->s_kobj);
-		kobject_put(&sbi->s_kobj);
+		kobject_del_and_put(&sbi->s_kobj);
 		wait_for_completion(&sbi->s_kobj_unregister);
 	}
 }
-- 
2.35.1


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

* [PATCH v2 04/10] zonefs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 03/10] erofs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 05/10] ubifs: " Yangtao Li
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Damien Le Moal, Naohiro Aota, Johannes Thumshirn
  Cc: Yangtao Li, linux-fsdevel, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/zonefs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index 8ccb65c2b419..5e117188fbb5 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -113,8 +113,7 @@ void zonefs_sysfs_unregister(struct super_block *sb)
 	if (!sbi || !sbi->s_sysfs_registered)
 		return;
 
-	kobject_del(&sbi->s_kobj);
-	kobject_put(&sbi->s_kobj);
+	kobject_del_and_put(&sbi->s_kobj);
 	wait_for_completion(&sbi->s_kobj_unregister);
 }
 
-- 
2.35.1


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

* [PATCH v2 05/10] ubifs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (2 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 04/10] zonefs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 06/10] btrfs: " Yangtao Li
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Yangtao Li, linux-mtd, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/ubifs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 1c958148bb87..9571718e61a9 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
 
 void ubifs_sysfs_unregister(struct ubifs_info *c)
 {
-	kobject_del(&c->kobj);
-	kobject_put(&c->kobj);
+	kobject_del_and_put(&c->kobj);
 	wait_for_completion(&c->kobj_unregister);
 
 	kfree(c->stats);
-- 
2.35.1


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

* [PATCH v2 06/10] btrfs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (3 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 05/10] ubifs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 07/10] xfs: " Yangtao Li
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: Yangtao Li, linux-btrfs, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/btrfs/block-group.c |  5 +----
 fs/btrfs/sysfs.c       | 38 ++++++++++++--------------------------
 2 files changed, 13 insertions(+), 30 deletions(-)

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 5fc670c27f86..a2876235c6dc 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1125,10 +1125,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
 	}
 	up_write(&block_group->space_info->groups_sem);
 	clear_incompat_bg_bits(fs_info, block_group->flags);
-	if (kobj) {
-		kobject_del(kobj);
-		kobject_put(kobj);
-	}
+	kobject_del_and_put(kobj);
 
 	if (block_group->cached == BTRFS_CACHE_STARTED)
 		btrfs_wait_block_group_cache_done(block_group);
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 37fc58a7f27e..49b837561135 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -1390,20 +1390,17 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
 static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs)
 {
 	if (fs_devs->devinfo_kobj) {
-		kobject_del(fs_devs->devinfo_kobj);
-		kobject_put(fs_devs->devinfo_kobj);
+		kobject_del_and_put(fs_devs->devinfo_kobj);
 		fs_devs->devinfo_kobj = NULL;
 	}
 
 	if (fs_devs->devices_kobj) {
-		kobject_del(fs_devs->devices_kobj);
-		kobject_put(fs_devs->devices_kobj);
+		kobject_del_and_put(fs_devs->devices_kobj);
 		fs_devs->devices_kobj = NULL;
 	}
 
 	if (fs_devs->fsid_kobj.state_initialized) {
-		kobject_del(&fs_devs->fsid_kobj);
-		kobject_put(&fs_devs->fsid_kobj);
+		kobject_del_and_put(&fs_devs->fsid_kobj);
 		wait_for_completion(&fs_devs->kobj_unregister);
 	}
 }
@@ -1445,19 +1442,16 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info)
 
 	if (fs_info->space_info_kobj) {
 		sysfs_remove_files(fs_info->space_info_kobj, allocation_attrs);
-		kobject_del(fs_info->space_info_kobj);
-		kobject_put(fs_info->space_info_kobj);
+		kobject_del_and_put(fs_info->space_info_kobj);
 	}
 	if (fs_info->discard_kobj) {
 		sysfs_remove_files(fs_info->discard_kobj, discard_attrs);
-		kobject_del(fs_info->discard_kobj);
-		kobject_put(fs_info->discard_kobj);
+		kobject_del_and_put(fs_info->discard_kobj);
 	}
 #ifdef CONFIG_BTRFS_DEBUG
 	if (fs_info->debug_kobj) {
 		sysfs_remove_files(fs_info->debug_kobj, btrfs_debug_mount_attrs);
-		kobject_del(fs_info->debug_kobj);
-		kobject_put(fs_info->debug_kobj);
+		kobject_del_and_put(fs_info->debug_kobj);
 	}
 #endif
 	addrm_unknown_feature_attrs(fs_info, false);
@@ -1620,13 +1614,9 @@ void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info)
 
 		kobj = space_info->block_group_kobjs[i];
 		space_info->block_group_kobjs[i] = NULL;
-		if (kobj) {
-			kobject_del(kobj);
-			kobject_put(kobj);
-		}
+		kobject_del_and_put(kobj);
 	}
-	kobject_del(&space_info->kobj);
-	kobject_put(&space_info->kobj);
+	kobject_del_and_put(&space_info->kobj);
 }
 
 static const char *alloc_name(u64 flags)
@@ -1681,8 +1671,7 @@ void btrfs_sysfs_remove_device(struct btrfs_device *device)
 		sysfs_remove_link(devices_kobj, bdev_kobj(device->bdev)->name);
 
 	if (device->devid_kobj.state_initialized) {
-		kobject_del(&device->devid_kobj);
-		kobject_put(&device->devid_kobj);
+		kobject_del_and_put(&device->devid_kobj);
 		wait_for_completion(&device->kobj_unregister);
 	}
 }
@@ -2255,8 +2244,7 @@ void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info)
 					     &fs_info->qgroup_tree, node)
 		btrfs_sysfs_del_one_qgroup(fs_info, qgroup);
 	if (fs_info->qgroups_kobj) {
-		kobject_del(fs_info->qgroups_kobj);
-		kobject_put(fs_info->qgroups_kobj);
+		kobject_del_and_put(fs_info->qgroups_kobj);
 		fs_info->qgroups_kobj = NULL;
 	}
 }
@@ -2304,10 +2292,8 @@ void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
 	if (test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state))
 		return;
 
-	if (qgroup->kobj.state_initialized) {
-		kobject_del(&qgroup->kobj);
-		kobject_put(&qgroup->kobj);
-	}
+	if (qgroup->kobj.state_initialized)
+		kobject_del_and_put(&qgroup->kobj);
 }
 
 /*
-- 
2.35.1


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

* [PATCH v2 07/10] xfs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (4 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 06/10] btrfs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 08/10] ocfs2: " Yangtao Li
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Yangtao Li, linux-xfs, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/xfs/xfs_sysfs.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_sysfs.h b/fs/xfs/xfs_sysfs.h
index 148893ebfdef..e2ff063e2c29 100644
--- a/fs/xfs/xfs_sysfs.h
+++ b/fs/xfs/xfs_sysfs.h
@@ -48,8 +48,7 @@ static inline void
 xfs_sysfs_del(
 	struct xfs_kobj	*kobj)
 {
-	kobject_del(&kobj->kobject);
-	kobject_put(&kobj->kobject);
+	kobject_del_and_put(&kobj->kobject);
 	wait_for_completion(&kobj->complete);
 }
 
-- 
2.35.1


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

* [PATCH v2 08/10] ocfs2: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (5 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 07/10] xfs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 09/10] nfs: " Yangtao Li
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker, Joseph Qi; +Cc: Yangtao Li, ocfs2-devel, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/ocfs2/filecheck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index 1ad7106741f8..fb9cf601245b 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -198,8 +198,7 @@ void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb)
 	if (!osb->osb_fc_ent.fs_fcheck)
 		return;
 
-	kobject_del(&osb->osb_fc_ent.fs_kobj);
-	kobject_put(&osb->osb_fc_ent.fs_kobj);
+	kobject_del_and_put(&osb->osb_fc_ent.fs_kobj);
 	wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister);
 	ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent);
 }
-- 
2.35.1


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

* [PATCH v2 09/10] nfs: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (6 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 08/10] ocfs2: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  8:41 ` [PATCH v2 10/10] nilfs2: " Yangtao Li
  2023-03-19  9:08 ` [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Greg Kroah-Hartman
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: Yangtao Li, linux-nfs, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/nfs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 0cbcd2dfa732..a6072be5fa5a 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -185,8 +185,7 @@ void nfs_netns_sysfs_destroy(struct nfs_net *netns)
 
 	if (clp) {
 		kobject_uevent(&clp->kobject, KOBJ_REMOVE);
-		kobject_del(&clp->kobject);
-		kobject_put(&clp->kobject);
+		kobject_del_and_put(&clp->kobject);
 		netns->nfs_client = NULL;
 	}
 }
-- 
2.35.1


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

* [PATCH v2 10/10] nilfs2: convert to kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (7 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 09/10] nfs: " Yangtao Li
@ 2023-03-19  8:41 ` Yangtao Li
  2023-03-19  9:08 ` [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Greg Kroah-Hartman
  9 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  8:41 UTC (permalink / raw)
  To: Ryusuke Konishi; +Cc: Yangtao Li, linux-nilfs, linux-kernel

Use kobject_del_and_put() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/nilfs2/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c
index 379d22e28ed6..150965d58ca5 100644
--- a/fs/nilfs2/sysfs.c
+++ b/fs/nilfs2/sysfs.c
@@ -1042,8 +1042,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)
 	nilfs_sysfs_delete_segments_group(nilfs);
 	nilfs_sysfs_delete_superblock_group(nilfs);
 	nilfs_sysfs_delete_segctor_group(nilfs);
-	kobject_del(&nilfs->ns_dev_kobj);
-	kobject_put(&nilfs->ns_dev_kobj);
+	kobject_del_and_put(&nilfs->ns_dev_kobj);
 	kfree(nilfs->ns_dev_subgroups);
 }
 
-- 
2.35.1


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

* Re: [PATCH v2 01/10] kobject: introduce kobject_del_and_put()
  2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
                   ` (8 preceding siblings ...)
  2023-03-19  8:41 ` [PATCH v2 10/10] nilfs2: " Yangtao Li
@ 2023-03-19  9:08 ` Greg Kroah-Hartman
  2023-03-19  9:36   ` Yangtao Li
  9 siblings, 1 reply; 13+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-19  9:08 UTC (permalink / raw)
  To: Yangtao Li; +Cc: Rafael J. Wysocki, linux-kernel

On Sun, Mar 19, 2023 at 04:41:24PM +0800, Yangtao Li wrote:
> There are plenty of using kobject_del() and kobject_put() together
> in the kernel tree. This patch wraps these two calls in a single helper.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> v2:
> -add kobject_del_and_put() users
>  include/linux/kobject.h |  1 +
>  lib/kobject.c           | 17 +++++++++++++++--
>  2 files changed, 16 insertions(+), 2 deletions(-)

Any reason you only sent me one patch?  I guess you don't want me to
review them?  :(


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

* Re: kobject: introduce kobject_del_and_put()
  2023-03-19  9:08 ` [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Greg Kroah-Hartman
@ 2023-03-19  9:36   ` Yangtao Li
  2023-03-19 10:06     ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: Yangtao Li @ 2023-03-19  9:36 UTC (permalink / raw)
  To: gregkh; +Cc: frank.li, linux-kernel, rafael

> Any reason you only sent me one patch?  I guess you don't want me to
> review them?  :(

Sorry, I used the following git configuration to send emails, so it was
not sent to you.

[sendemail]
    tocmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol"
    cccmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom"

I amended the resent patch, the patch body states cc to you and Rafael.

Thx,
Yangtao

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

* Re: kobject: introduce kobject_del_and_put()
  2023-03-19  9:36   ` Yangtao Li
@ 2023-03-19 10:06     ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2023-03-19 10:06 UTC (permalink / raw)
  To: Yangtao Li; +Cc: linux-kernel, rafael

On Sun, Mar 19, 2023 at 05:36:36PM +0800, Yangtao Li wrote:
> > Any reason you only sent me one patch?  I guess you don't want me to
> > review them?  :(
> 
> Sorry, I used the following git configuration to send emails, so it was
> not sent to you.
> 
> [sendemail]
>     tocmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nol"
>     cccmd ="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom"
> 
> I amended the resent patch, the patch body states cc to you and Rafael.

Great, thanks, I got them now, I'll queue them up later next week if
there's no complaints.

greg k-h

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

end of thread, other threads:[~2023-03-19 10:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-19  8:41 [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Yangtao Li
2023-03-19  8:41 ` [PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
2023-03-19  8:41 ` [PATCH v2 03/10] erofs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 04/10] zonefs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 05/10] ubifs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 06/10] btrfs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 07/10] xfs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 08/10] ocfs2: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 09/10] nfs: " Yangtao Li
2023-03-19  8:41 ` [PATCH v2 10/10] nilfs2: " Yangtao Li
2023-03-19  9:08 ` [PATCH v2 01/10] kobject: introduce kobject_del_and_put() Greg Kroah-Hartman
2023-03-19  9:36   ` Yangtao Li
2023-03-19 10:06     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox