summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* jffs2: drop null test before destroy functionsJulia Lawall2015-09-211-18/+9
| | | | | | | | | | | | | | | | Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* jffs2: NULL return of kmem_cache_zalloc should be handledZhouyi Zhou2014-01-031-0/+4
| | | | | | | | NULL return of kmem_cache_zalloc should be handled in jffs2_alloc_xattr_datum and jff2_alloc_xattr_ref. Signed-off-by: Zhouyi Zhou <yizhouzhou@ict.ac.cn> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* jffs2: Use pr_fmt and remove jffs: from formatsJoe Perches2012-03-271-0/+2
| | | | | | | | | | Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages. Remove now unnecessary internal prefixes from formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* jffs2: Use SLAB_HWCACHE_ALIGN for jffs2_raw_{dirent,inode} slabsDavid Woodhouse2009-09-191-2/+2
| | | | | | | | | We may end up doing DMA to/from these. Until the new MTD API fixes the issues, this should stop things from falling over. Original idea from Gilles Casse <list@gcasse.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [JFFS2] kmem_cache_alloc/memset -> kmem_cache_zallocWei Yongjun2009-03-201-4/+2
| | | | | | | | Used kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-201-9/+9
| | | | | | | | | | | | | | Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [JFFS2] Tidy up licensing/copyright boilerplate.David Woodhouse2007-04-251-3/+1
| | | | | | | | | | | | | | In particular, remove the bit in the LICENCE file about contacting Red Hat for alternative arrangements. Their errant IS department broke that arrangement a long time ago -- the policy of collecting copyright assignments from contributors came to an end when the plug was pulled on the servers hosting the project, without notice or reason. We do still dual-license it for use with eCos, with the GPL+exception licence approved by the FSF as being GPL-compatible. It's just that nobody has the right to license it differently. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] slab: remove kmem_cache_tChristoph Lameter2006-12-071-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of kmem_cache_t with struct kmem_cache. The patch was generated using the following script: #!/bin/sh # # Replace one string by another in all the kernel sources. # set -e for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do quilt add $file sed -e "1,\$s/$1/$2/g" $file >/tmp/$$ mv /tmp/$$ $file quilt refresh done The script was run like this sh replace kmem_cache_t "struct kmem_cache" Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* fs/jffs2/: make 2 functions staticAdrian Bunk2006-06-291-1/+1
| | | | | | | This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2][XATTR] using 'delete marker' for xdatum/xref deletionKaiGai Kohei2006-06-271-0/+2
| | | | | | | | | | | | | | | | | - When xdatum is removed, a new xdatum with 'delete marker' is written. (version==0xffffffff means 'delete marker') - When xref is removed, a new xref with 'delete marker' is written. (odd-numbered xseqno means 'delete marker') - delete_xattr_(datum/xref)_delay() are new deletion functions are added. We can only use them if we can detect the target obsolete xdatum/xref as a orphan or errir one. (e.g when inode deletion, or detecting crc error) [1/3] jffs2-xattr-v6-01-delete_marker.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] Switch to using an array of jffs2_raw_node_refs instead of a list.David Woodhouse2006-05-261-24/+51
| | | | | | | | This allows us to drop another pointer from the struct jffs2_raw_node_ref, shrinking it to 8 bytes on 32-bit machines (if the TEST_TOTLEN) paranoia check is turned off, which will be committed soon). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] Add 'jeb' argument to jffs2_prealloc_raw_node_refs()David Woodhouse2006-05-251-1/+2
| | | | | | | Preallocation of refs is shortly going to be a per-eraseblock thing, rather than per-filesystem. Add the required argument to the function. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] Reduce visibility of raw_node_ref to upper layers of JFFS2 code.David Woodhouse2006-05-241-2/+24
| | | | | | | | | | | | | As the first step towards eliminating the ref->next_phys member and saving memory by using an _array_ of struct jffs2_raw_node_ref per eraseblock, stop the write functions from allocating their own refs; have them just _reserve_ the appropriate number instead. Then jffs2_link_node_ref() can just fill them in. Use a linked list of pre-allocated refs in the superblock, for now. Once we switch to an array, it'll just be a case of extending that array. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2][XATTR] Remove 'struct list_head ilist' from jffs2_inode_cache.KaiGai Kohei2006-05-131-1/+0
| | | | | | | | This patch can reduce 4-byte of memory usage per inode_cache. [4/10] jffs2-xattr-v5.1-04-remove_ilist_from_ic.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
* [JFFS2][XATTR] XATTR support on JFFS2 (version. 5)KaiGai Kohei2006-05-131-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This attached patches provide xattr support including POSIX-ACL and SELinux support on JFFS2 (version.5). There are some significant differences from previous version posted at last December. The biggest change is addition of EBS(Erase Block Summary) support. Currently, both kernel and usermode utility (sumtool) can recognize xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype. In addition, some bugs are fixed. - A potential race condition was fixed. - Unexpected fail when updating a xattr by same name/value pair was fixed. - A bug when removing xattr name/value pair was fixed. The fundamental structures (such as using two new nodetypes and exclusion mechanism by rwsem) are unchanged. But most of implementation were reviewed and updated if necessary. Espacially, we had to change several internal implementations related to load_xattr_datum() to avoid a potential race condition. [1/2] xattr_on_jffs2.kernel.version-5.patch [2/2] xattr_on_jffs2.utils.version-5.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [JFFS2] Clean up trailing white spacesThomas Gleixner2005-11-071-2/+2
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Debug code simplification, update TODOArtem B. Bityutskiy2005-11-061-17/+17
| | | | | | | | Simplify the debugging code further. Update the TODO list Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [JFFS2] Debug code clean up - step 4Artem B. Bityutskiy2005-11-061-40/+42
| | | | | | | Small comment cleanups. Remove a unused macro Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+205
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud