summaryrefslogtreecommitdiffstats
path: root/fs/jffs2
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Unlinline a bunch of other functionsArjan van de Ven2006-01-142-3/+3
| | | | | | | | | | | Remove the "inline" keyword from a bunch of big functions in the kernel with the goal of shrinking it by 30kb to 40kb Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] capable/capability.h (fs/)Randy Dunlap2006-01-111-0/+1
| | | | | | | | | fs: Use <linux/capability.h> where capable() is used. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [JFFS2] Fix the slab cache constructor of 'struct jffs2_inode_info' objects.Thomas Gleixner2005-11-292-1/+3
| | | | | | | | | | | | | | | JFFS2 initialize f->sem mutex as "locked" in the slab constructor which is a bug. Objects are freed with unlocked f->sem mutex. So, when they allocated again, f->sem is unlocked because the slab cache constructor is not called for them. The constructor is called only once when memory pages are allocated for objects (namely, when the slab layer allocates new slabs). So, sometimes 'struct jffs2_inode_info' are allocated with unlocked f->sem, sometimes with locked. This is a bug. Instead, initialize f->sem as unlocked in the constructor. I.e., in the "constructed" state f->sem must be unlocked. From: Keijiro Yano <keijiro_yano@yahoo.co.jp> Acked-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] jffs2 debug gcc-2.9x fixAndrew Morton2005-11-231-4/+4
| | | | | | | | Work around gcc-2.95.x macro expansion bug. Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [JFFS2] Remove broken and useless debug codeThomas Gleixner2005-11-131-3/+0
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6Linus Torvalds2005-11-0736-2133/+4529
|\ | | | | | | Some manual fixups for clashing kfree() cleanups etc.
| * [JFFS2] Clean up trailing white spacesThomas Gleixner2005-11-0732-585/+584
| | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Fix broken compile when debug level = 2Artem B. Bityutskiy2005-11-061-3/+3
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Return 0, not number of bytes written, for success at commit_writeTodd Poynor2005-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | Some callers to block-layer commit_write function treat non-zero return as error, notably the loopback mount driver sometimes used in conjunction with JFFS2 on NAND flash for bad block avoidance, etc. Return zero for success as do various other commit_write functions. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Fix dataflash supportArtem B. Bityutskiy2005-11-063-22/+40
| | | | | | | | | | | | | | | | | | | | - assume wbuf may be of size which is not power of 2 - don't make strange assumption about not padding wbuf for DataFlash - use wbuf = DataFlash page and eraseblock >= 8 Dataflash pages From: Peter Menzebach <pm-mtd@mw-itcon.de> Acked-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Use memset(struct) instead of nulling struct members one by oneArtem B. Bityutskiy2005-11-061-10/+7
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Remove stale commentArtem B. Bityutskiy2005-11-061-2/+1
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Rename jffs2_summary_node to jffs2_raw_summaryFerenc Havasi2005-11-062-9/+9
| | | | | | | | | | Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code simplification, update TODOArtem B. Bityutskiy2005-11-0613-264/+232
| | | | | | | | | | | | | | | | 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] Account summary space in reserved_size.Ferenc Havasi2005-11-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | Always keep valid data in reserved_size. It did not cause problems, but the reservation code was unoptimal when centralized summary was active or the size of the erase block was very small. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug message format clean upArtem B. Bityutskiy2005-11-062-159/+120
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Call summary collector for all mtd devices with writev supportFerenc Havasi2005-11-061-5/+6
| | | | | | | | | | | | | | | | | | Do the summary collection in the right place. If the device was not writebuffered but had c->mtd->writev function (e.g. blkmtd) the summary collector function was not called. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Return real jffs2_sum_init() error codeFerenc Havasi2005-11-061-3/+5
| | | | | | | | | | Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Add erase block summary support (mount time improvement)Ferenc Havasi2005-11-0617-197/+1359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of summary is to speed up the mount time. Erase block summary (EBS) stores summary information at the end of every (closed) erase block. It is no longer necessary to scan all nodes separetly (and read all pages of them) just read this "small" summary, where every information is stored which is needed at mount time. This summary information is stored in a JFFS2_FEATURE_RWCOMPAT_DELETE. During the mount process if there is no summary info the orignal scan process will be executed. EBS works with NAND and NOR flashes, too. There is a user space tool called sumtool to generate this summary information for a JFFS2 image. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Remove support for virtual blocksFerenc Havasi2005-11-064-23/+13
| | | | | | | | | | | | | | | | | | | | | | Remove support for virtual blocks, which are build by concatenation of multiple physical erase blocks. For more information please read the MTD mailing list thread "[PATCH] remove support for virtual blocks" Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Solve BUG caused by frag->node representing a hole in fragtreeArtem B. Bityutskiy2005-11-061-2/+2
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Calculate CRC check starting point correctlyArtem B. Bityutskiy2005-11-062-8/+9
| | | | | | | | | | | | | | | | | | | | When data starts from the beginning of NAND page, 'len' must be zero, not c->wbuf_page. Thanks to Zoltan Sogor for reporting this problem. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] More message formatting cleanupsArtem B. Bityutskiy2005-11-062-7/+7
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Fix JFFS2 [mc]time handlingArtem B. Bityutskiy2005-11-065-17/+37
| | | | | | | | | | | | | | From: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Make the JFFS2 messages a bit nicerArtem B. Bityutskiy2005-11-061-5/+5
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Teach JFFS2 about Sibley flashNicolas Pitre2005-11-063-5/+46
| | | | | | | | | | | | | | Intels Sibley flash needs JFFS2 write buffer functionality Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 7Artem B. Bityutskiy2005-11-064-64/+71
| | | | | | | | | | | | | | | | Remove more noisy debugs. Add current->pid to debug messages. Remove bogus includes. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Correct buggy length checksArtem B. Bityutskiy2005-11-062-4/+4
| | | | | | | | | | | | | | The previous changes introduced wrong length calculations. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 6Artem B. Bityutskiy2005-11-063-28/+15
| | | | | | | | | | | | | | Remove extra noisy debugs Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Build fragtree in reverse orderArtem B. Bityutskiy2005-11-063-253/+868
| | | | | | | | | | | | | | | | | | Instead of building fragtree starting from node with the smallest version number, start from the highest. This helps to avoid reading and checking obsolete nodes. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Refine fragtree debug macrosArtem B. Bityutskiy2005-11-061-6/+6
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Move another fragtree-related function to nodelist.cArtem B. Bityutskiy2005-11-063-28/+28
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Fix up new debug code for eCos buildAndrew Lunn2005-11-063-10/+16
| | | | | | | | | | | | | | The debug code cleanup broke the eCos build. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 5Artem B. Bityutskiy2005-11-062-143/+117
| | | | | | | | | | | | | | Replace the D1(printk()) style debugging with the new debug macros Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Move scattered function into related filesArtem B. Bityutskiy2005-11-063-800/+790
| | | | | | | | | | | | | | | | Move functions to read inodes into readinode.c Move functions to handle fragtree and dentry lists into nodelist.[ch] 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-062-44/+54
| | | | | | | | | | | | | | Small comment cleanups. Remove a unused macro Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [jffs2] Remove compressor lzo and lzariFerenc Havasi2005-11-062-22/+2
| | | | | | | | | | | | | | Remove unused compressor code Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Namespace clean upArtem B. Bityutskiy2005-11-064-27/+8
| | | | | | | | | | | | | | | | Rename functions to a name matching the functionality. Remove stall debug code Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 3Artem B. Bityutskiy2005-11-0614-239/+630
| | | | | | | | | | | | | | | | Various simplifiactions. printk format corrections. Convert more code to use the new debug functions. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Fix slab panicArtem B. Bityutskiy2005-11-061-3/+2
| | | | | | | | | | | | | | | | | | | | When JFFS22 is unable to read the root inode, the bad root inode object is not freed and remains sticked in the jffs2_i slab cache. When we further try to free the slab cache (e.g., on rmmod jffs2), slab allocator subsystem panics. Fix this bug. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 2Artem B. Bityutskiy2005-11-065-13/+13
| | | | | | | | | | | | | | | | If debugging is disabled, define debugging functions as empty macros, instead of using Dx() explicitly. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Use f->target instead of f->dents for symlink targetArtem B. Bityutskiy2005-11-064-46/+40
| | | | | | | | | | | | | | | | | | | | JFFS2 uses f->dents to store the pointer to the symlink target string (in case the inode is symlink). This is somewhat ugly to use the same field for different reasons. Introduce distinct field f->target for this purpose. Note, f->fragtree, f->dents, f->target may probably be put in a union. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Debug code clean up - step 1Artem B. Bityutskiy2005-11-0614-439/+663
| | | | | | | | | | | | | | Move debug functions into a seperate source file Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * [JFFS2] Split a large routine on several smaller.Artem B. Bityutskiy2005-11-061-261/+336
| | | | | | | | | | Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | [PATCH] kfree cleanup: fsJesper Juhl2005-11-072-7/+4
|/ | | | | | | | | | This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fix missing includesTim Schmielau2005-10-302-0/+3
| | | | | | | | | | | | | | | | | | | | | I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] jffs/jffs2: remove wrong function prototypesAdrian Bunk2005-09-071-3/+0
| | | | | | | | | | | | This patch removes prototypes for the generic_file_open and generic_file_llseek functions. Besides being superfluous because they are already present in fs.h, they were also wrong because the actual functions aren't weak functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix up symlink function pointersAl Viro2005-08-191-3/+3
| | | | | | | | | | This fixes up the symlink functions for the calling convention change: * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs, smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link() * befs, smbfs, xfs - same for ->put_link() Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] jffs2: fix symlink error handlingAl Viro2005-08-191-4/+6
| | | | | | | | | | | | | | | | | The current calling conventions for ->follow_link() are already fairly complex. What we have is 1) you can return -error; then you must release nameidata yourself and ->put_link() will _not_ be called. 2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0 3) you can do nd_set_link(nd, path) and return 0 4) you can return 0 (after having moved nameidata yourself) jffs2 follow_link() is broken - it has an exit where it returns -EIO and leaks nameidata. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [JFFS2] Fix node allocation leakThomas Gleixner2005-07-151-82/+92
| | | | | | | | | | In the rare case of failing to write the cleanmarker the allocated node was not freed. Pointed out by Forrest Zhao Initial cleanup by Joern Engel Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
OpenPOWER on IntegriCloud