linux/fs/jfs
David Rientjes ee1462458c fs, jfs: remove slab object constructor
Mempools based on slab caches with object constructors are risky because
element allocation can happen either from the slab cache itself, meaning
the constructor is properly called before returning, or from the mempool
reserve pool, meaning the constructor is not called before returning,
depending on the allocation context.

For this reason, we should disallow creating mempools based on slab caches
that have object constructors.  Callers of mempool_alloc() will be
responsible for properly initializing the returned element.

Then, it doesn't matter if the element came from the slab cache or the
mempool reserved pool.

The only occurrence of a mempool being based on a slab cache with an
object constructor in the tree is in fs/jfs/jfs_metapage.c.  Remove it and
properly initialize the element in alloc_metapage().

At the same time, META_free is never used, so remove it as well.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:18 -07:00
..
Kconfig jfs: needs crc32_le 2009-02-02 13:43:28 -06:00
Makefile fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
acl.c JFS: Check for NULL before calling posix_acl_equiv_mode() 2014-05-28 21:19:02 -05:00
file.c vfs: add support for a lazytime mount option 2015-02-05 02:45:00 -05:00
inode.c fs: move struct kiocb to fs.h 2015-03-25 20:28:11 -04:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
jfs_acl.h jfs: use generic posix ACL infrastructure 2014-01-25 23:58:22 -05:00
jfs_btree.h JFS: White space cleanup 2006-10-02 09:55:27 -05:00
jfs_debug.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
jfs_debug.h JFS: switch to seq_files 2008-05-13 08:22:10 -05:00
jfs_dinode.h BKL-removal: Implement a compat_ioctl handler for JFS 2008-02-07 13:45:29 -06:00
jfs_discard.c jfs: Fix FITRIM argument handling 2012-10-17 09:18:38 -05:00
jfs_discard.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dmap.c fs/jfs/jfs_dmap.c: replace min/casting by min_t 2014-06-03 14:14:00 -05:00
jfs_dmap.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dtree.c jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
jfs_dtree.h [readdir] convert jfs 2013-06-29 12:56:42 +04:00
jfs_extent.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_extent.h JFS: White space cleanup 2006-10-02 09:55:27 -05:00
jfs_filsys.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_imap.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_imap.h JFS: Whitespace cleanup and remove some dead code 2007-06-06 15:28:35 -05:00
jfs_incore.h jfs: Convert to private i_dquot field 2014-11-10 10:06:18 +01:00
jfs_inode.c fs/jfs/jfs_inode.c: atomically set inode->i_flags 2014-04-14 12:56:14 -05:00
jfs_inode.h fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers 2011-07-20 20:47:59 -04:00
jfs_lock.h JFS: use __set_current_state() 2007-04-26 07:30:29 -05:00
jfs_logmgr.c sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule() 2014-09-19 12:35:17 +02:00
jfs_logmgr.h Fix common misspellings 2011-03-31 11:26:23 -03:00
jfs_metapage.c fs, jfs: remove slab object constructor 2015-04-15 16:35:18 -07:00
jfs_metapage.h fs, jfs: remove slab object constructor 2015-04-15 16:35:18 -07:00
jfs_mount.c fix printk typo 'faild' 2010-08-09 11:25:17 +02:00
jfs_superblock.h jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_txnmgr.c sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule() 2014-09-19 12:35:17 +02:00
jfs_txnmgr.h JFS: Whitespace cleanup and remove some dead code 2007-06-06 15:28:35 -05:00
jfs_types.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
jfs_umount.c jfs: flush journal completely before releasing metadata inodes 2011-08-01 12:41:00 -05:00
jfs_unicode.c JFS: White space cleanup 2006-10-02 09:55:27 -05:00
jfs_unicode.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
jfs_uniupr.c JFS: White space cleanup 2006-10-02 09:55:27 -05:00
jfs_xattr.h jfs: use generic posix ACL infrastructure 2014-01-25 23:58:22 -05:00
jfs_xtree.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_xtree.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
namei.c assorted conversions to %p[dD] 2014-11-19 13:01:20 -05:00
resize.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
super.c jfs: %pf is only for function pointers 2015-03-12 12:32:19 -05:00
symlink.c jfs: add jfs specific ->setattr call 2010-04-16 08:05:50 -05:00
xattr.c jfs: fix generic posix ACL regression 2014-02-08 10:50:58 -06:00