- make-kmem_cache_destroy-return-void.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Make kmem_cache_destroy() return void

has been removed from the -mm tree.  Its filename is

     make-kmem_cache_destroy-return-void.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: Make kmem_cache_destroy() return void
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>

un-, de-, -free, -destroy, -exit, etc functions should in general return
void.  Also,

There is very little, say, filesystem driver code can do upon failed
kmem_cache_destroy().  If it will be decided to BUG in this case, BUG
should be put in generic code, instead.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/slab.h |    4 ++--
 mm/slab.c            |    6 ++----
 mm/slob.c            |    3 +--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff -puN include/linux/slab.h~make-kmem_cache_destroy-return-void include/linux/slab.h
--- a/include/linux/slab.h~make-kmem_cache_destroy-return-void
+++ a/include/linux/slab.h
@@ -60,7 +60,7 @@ extern void __init kmem_cache_init(void)
 extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
 				       void (*)(void *, kmem_cache_t *, unsigned long),
 				       void (*)(void *, kmem_cache_t *, unsigned long));
-extern int kmem_cache_destroy(kmem_cache_t *);
+extern void kmem_cache_destroy(kmem_cache_t *);
 extern int kmem_cache_shrink(kmem_cache_t *);
 extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
 extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
@@ -249,7 +249,7 @@ struct kmem_cache *kmem_cache_create(con
 	unsigned long,
 	void (*)(void *, struct kmem_cache *, unsigned long),
 	void (*)(void *, struct kmem_cache *, unsigned long));
-int kmem_cache_destroy(struct kmem_cache *c);
+void kmem_cache_destroy(struct kmem_cache *c);
 void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags);
 void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
 void kmem_cache_free(struct kmem_cache *c, void *b);
diff -puN mm/slab.c~make-kmem_cache_destroy-return-void mm/slab.c
--- a/mm/slab.c~make-kmem_cache_destroy-return-void
+++ a/mm/slab.c
@@ -2442,7 +2442,6 @@ EXPORT_SYMBOL(kmem_cache_shrink);
  * @cachep: the cache to destroy
  *
  * Remove a struct kmem_cache object from the slab cache.
- * Returns 0 on success.
  *
  * It is expected this function will be called by a module when it is
  * unloaded.  This will remove the cache completely, and avoid a duplicate
@@ -2454,7 +2453,7 @@ EXPORT_SYMBOL(kmem_cache_shrink);
  * The caller must guarantee that noone will allocate memory from the cache
  * during the kmem_cache_destroy().
  */
-int kmem_cache_destroy(struct kmem_cache *cachep)
+void kmem_cache_destroy(struct kmem_cache *cachep)
 {
 	BUG_ON(!cachep || in_interrupt());
 
@@ -2475,7 +2474,7 @@ int kmem_cache_destroy(struct kmem_cache
 		list_add(&cachep->next, &cache_chain);
 		mutex_unlock(&cache_chain_mutex);
 		unlock_cpu_hotplug();
-		return 1;
+		return;
 	}
 
 	if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
@@ -2483,7 +2482,6 @@ int kmem_cache_destroy(struct kmem_cache
 
 	__kmem_cache_destroy(cachep);
 	unlock_cpu_hotplug();
-	return 0;
 }
 EXPORT_SYMBOL(kmem_cache_destroy);
 
diff -puN mm/slob.c~make-kmem_cache_destroy-return-void mm/slob.c
--- a/mm/slob.c~make-kmem_cache_destroy-return-void
+++ a/mm/slob.c
@@ -270,10 +270,9 @@ struct kmem_cache *kmem_cache_create(con
 }
 EXPORT_SYMBOL(kmem_cache_create);
 
-int kmem_cache_destroy(struct kmem_cache *c)
+void kmem_cache_destroy(struct kmem_cache *c)
 {
 	slob_free(c, sizeof(struct kmem_cache));
-	return 0;
 }
 EXPORT_SYMBOL(kmem_cache_destroy);
 
_

Patches currently in -mm which might be from adobriyan@xxxxxxxxx are

origin.patch
asus_acpi-fix-proc-files-parsing.patch
asus_acpi-dont-printk-on-writing-garbage-to-proc-files.patch
git-dvb.patch
git-ieee1394.patch
config_pm=n-slim-drivers-pcmcia.patch
i82092-wire-up-errors-from-pci_register_driver.patch
config_pm=n-slim-drivers-serial-8250_pcic.patch
git-scsi-misc.patch
megaraid-fix-warnings-when-config_proc_fs=n.patch
task_struct-ifdef-missedem-v-ipc.patch
ifdef-blktrace-debugging-fields.patch
tty_ioc-keep-davej-sane.patch
ifdef-quota_read-quota_write.patch
reiserfs-ifdef-xattr_sem.patch
reiserfs-ifdef-acl-stuff-from-inode.patch
fsh-ifdef-security-fields.patch
config_pm=n-slim-drivers-parport-parport_serialc.patch
config_pm=n-slim-sound-oss-tridentc.patch
config_pm=n-slim-sound-oss-cs46xxc.patch
windfarm_smu_satc-simplify-around-i2c_add_driver.patch
cramfs-rewrite-init_cramfs_fs.patch
freevxfs-fix-leak-on-error-path.patch
cramfs-make-cramfs_uncompress_exit-return-void.patch
9p-fix-leak-on-error-path.patch
ban-register_filesystemnull.patch
documentation-submittingdrivers-minor-update.patch
kmemdup-introduce.patch
kmemdup-some-users.patch
create-fs-utimesc.patch
proper-flags-type-of-spin_lock_irqsave.patch
remove-null-check-in-register_nls.patch
make-kmem_cache_destroy-return-void-ecryptfs.patch
config_pm=n-slim-drivers-ide-pci-sc1200c.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux