18 Jul, 2007
30 commits
-
cdev.c whines in current git:
drivers/mtd/ubi/cdev.c: In function `major_to_device':
drivers/mtd/ubi/cdev.c:67: warning: control reaches end of non-void functionShut it up.
Signed-off-by: Paul Mundt
Signed-off-by: Artem Bityutskiy -
Do not switch to read-only mode in case of -EINTR and some
other obvious cases. Switch to RO mode only when we do not
know what is the error.Reported-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Signed-off-by: Artem Bityutskiy
-
Pointed to by viro.
Signed-off-by: Artem Bityutskiy
-
The use of try_module_get(THIS_MODULE) in ubi_get_device_info does not
offer real protection against unexpected driver unloads, since we could
be preempted before try_modules_get gets executed. It is the caller who
should manipulate the refcounts. Besides, ubi_get_device_info is an
exported symbol which guarantees protection when accessed through
symbol_get.Signed-off-by: Fernando Luis Vazquez Cao
Signed-off-by: Artem Bityutskiy -
I was experiencing overflows in multiplications for
volume->used_bytes in vmt.c & vtbl.c, while creating & resizing large volumes.vol->used_bytes is long long however its 2 operands vol->used_ebs &
vol->usable_leb_size
are int. So their multiplication for larger values causes integer overflows.
Typecasting them solves the problem.My machine & flash details:
64Bit dual-core AMD opteron, 1 GB RAM, linux 2.6.18.3.
mtd size = 6GB, volume size= 5GB, peb_size = 4MB.heres patch which does the fix.
Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not zero max_sqnum after a new volume has been found.
Signed-off-by: Artem Bityutskiy
-
Hi,I came across problem of having two leb with same sequence no.This
happens when we continuously write one block again and again and reboot
machine before background thread erases those blocks.
The problem here was,when we find two blocks with same sequence no,we take
the higher one,but we were not updating max seq no,so next block may have
the same seqnum.
This patch solves this problem.Signed-off-by: Brijesh Singh
Signed-off-by: Artem Bityutskiy -
There is signed multiplication assigned to unsigned ei.addr in io.c.
This causes wrong addresses for big multiplication.This patch solves the
problem.Signed-off-by: Brijesh Singh
Signed-off-by: Artem Bityutskiy -
atomic_leb_change() is only allowed for dynamic volumes, so set
the volume type correctly.Signed-off-by: Artem Bityutskiy
-
Increase UBI devices couter after the message, not before.
Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not check volumes which are currently in use because thay may be
in inconsistent state.Signed-off-by: Artem Bityutskiy
-
When volume creation fails, we have to set ubi->volumes[vol_id]
back to NULL.This patch also tweaks some debugging stuff.
Signed-off-by: Artem Bityutskiy
-
Replacing (n & (n-1)) in the context of power of 2 checks
with is_power_of_2Signed-off-by: Vignesh Babu
Signed-off-by: Artem Bityutskiy -
ubi->vtbl is allocated using vmalloc() in vtbl.c empty_create_lvol(),
but it is freed in build.c with kfree()Signed-off-by: Vinit Agnihotri
Signed-off-by: Artem Bityutskiy -
Do not call 'ubi_wl_put_peb()' if the LEB was unmapped.
Reported-by: Gabor Loki
Signed-off-by: Artem Bityutskiy -
Kill UBI's homegrown endianess handling and replace it with
the standard kernel endianess handling.Signed-off-by: Christoph Hellwig
Signed-off-by: Artem Bityutskiy -
- don't do access_ok + get/put user but use the proper macro
- remove useless checksSigned-off-by: Christoph Hellwig
Signed-off-by: Artem Bityutskiy -
No need to unlock the lock, this will be done at out_unlock.
Signed-off-by: Artem Bityutskiy
-
Use coma at the the last elements of structure initializer.
Daniel Stone's explanation:
Because it turns:
- .attr = foo
+ .attr = foo,
+ .bar = bazinto:
+ .bar = baz,i.e., far less likely to screw up a merge.
Signed-off-by: Artem Bityutskiy
-
UBI allocates temporary buffers of PEB size, which may be 256KiB.
Use vmalloc instead of kmalloc for such big temporary buffers.Signed-off-by: Artem Bityutskiy
-
Add few comments above ubi_scan_add_used() to explain why it is so
complex. Requested by Satyam Sharma .Signed-off-by: Artem Bityutskiy
-
In case of static volumes, make emulated MTD device size to
be equivalent to data size, rather then volume size.Reported-by: John Smith
Signed-off-by: Artem Bityutskiy -
In case of static volumes it is prohibited to read more data
then available.Signed-off-by: Artem Bityutskiy
-
There were several bugs in volume table creation error path. Thanks to
Satyam Sharma and Florin Malita
for finding and analysing them: http://lkml.org/lkml/2007/5/3/274This patch makes ubi_scan_add_to_list() static and renames it to
add_to_list(), just because it is not needed outside scan.c anymore.Signed-off-by: Artem Bityutskiy
-
Coverity (CID 1614) spotted new_seb being dereferenced after kfree() in
create_vtbl's write_error path.Signed-off-by: Florin Malita
Signed-off-by: Artem Bityutskiy -
Reported-by: Eric Sesterhenn / Snakebyte
Signed-off-by: Artem Bityutskiy -
Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.Signed-off-by: Jeff Garzik
-
Signed-off-by: Jeff Garzik
-
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves. This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.The patch causes all kernel threads to be nonfreezable by default (ie. to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE. It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear. Additionally, it updates documentation to
describe the freezing of tasks more accurately.[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki
Acked-by: Nigel Cunningham
Cc: Pavel Machek
Cc: Oleg Nesterov
Cc: Gautham R Shenoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jul, 2007
2 commits
-
Signed-off-by: Yoichi Yuasa
Signed-off-by: Ralf Baechle -
Signed-off-by: Franck Bui-Huu
Signed-off-by: Ralf Baechledelete mode 100644 arch/mips/configs/ocelot_c_defconfig
delete mode 100644 arch/mips/momentum/ocelot_c/Makefile
delete mode 100644 arch/mips/momentum/ocelot_c/cpci-irq.c
delete mode 100644 arch/mips/momentum/ocelot_c/dbg_io.c
delete mode 100644 arch/mips/momentum/ocelot_c/irq.c
delete mode 100644 arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
delete mode 100644 arch/mips/momentum/ocelot_c/platform.c
delete mode 100644 arch/mips/momentum/ocelot_c/prom.c
delete mode 100644 arch/mips/momentum/ocelot_c/reset.c
delete mode 100644 arch/mips/momentum/ocelot_c/setup.c
delete mode 100644 arch/mips/momentum/ocelot_c/uart-irq.c
delete mode 100644 arch/mips/pci/fixup-ocelot-c.c
delete mode 100644 arch/mips/pci/pci-ocelot-c.c
05 Jun, 2007
1 commit
-
* git://git.infradead.org/mtd-2.6:
[JFFS2] Fix obsoletion of metadata nodes in jffs2_add_tn_to_tree()
[MTD] Fix error checking after get_mtd_device() in get_sb_mtd functions
[JFFS2] Fix buffer length calculations in jffs2_get_inode_nodes()
[JFFS2] Fix potential memory leak of dead xattrs on unmount.
[JFFS2] Fix BUG() caused by failing to discard xattrs on deleted files.
[MTD] generalise the handling of MTD-specific superblocks
[MTD] [MAPS] don't force uclinux mtd map to be root dev
02 Jun, 2007
1 commit
-
It returns ERR_PTR(foo) on error, not just NULL.
Signed-off-by: David Woodhouse
01 Jun, 2007
2 commits
-
Fix various bits of obviously-busted code which we're not happening to
compile, due to ifdefs.Cc: "Luck, Tony"
Cc: Ivan Kokshaysky
Cc: Richard Henderson
Cc: Russell King
Cc: Ralf Baechle
Cc: Jeff Garzik
Cc: Jan Kara
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
I have made a tool to parse the kernel that does not pre-process the
source. That means that my parser tries to parse all the code, including
code in the #else branch or code that is not often compiled because the
driver is not very used (or not used at all). So, my parser sometimes
reports parse error not originally detected by gcc. Here is my (first)
patch.[akpm@linux-foundation.org: fix amd8111e.c]
Signed-off-by: Yoann Padioleau
Acked-by: Matthew Wilcox
Acked-by: Wim Van Sebroeck
Acked-by: David Woodhouse
Acked-by: Jeff Garzik
Acked-by: James Bottomley
Cc: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 May, 2007
1 commit
-
SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
Signed-off-by: Christoph Lameter
Cc: David Howells
Cc: Jens Axboe
Cc: Steven French
Cc: Michael Halcrow
Cc: OGAWA Hirofumi
Cc: Miklos Szeredi
Cc: Steven Whitehouse
Cc: Roman Zippel
Cc: David Woodhouse
Cc: Dave Kleikamp
Cc: Trond Myklebust
Cc: "J. Bruce Fields"
Cc: Anton Altaparmakov
Cc: Mark Fasheh
Cc: Paul Mackerras
Cc: Christoph Hellwig
Cc: Jan Kara
Cc: David Chinner
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 May, 2007
2 commits
-
Generalise the handling of MTD-specific superblocks so that JFFS2 and ROMFS
can both share it.Signed-off-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: David Woodhouse -
The cheesy uclinux mtd maps can be used for more than just the root device, so
I think we should drop the forcing.Also, I feel like this is a policy decision that shouldnt be in the kernel in
the first place. People who have been lazy and boot with uclinux mtd maps and
dont put root= into their commandline can simply add the appropriate root=
line either into their bootloader or into the compiled in bootargs.Signed-off-by: Mike Frysinger
Acked-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: David Woodhouse
10 May, 2007
1 commit
-
Add "depends on HAS_IOMEM" to a number of menus to make them
disappear for s390 which does not have I/O memory.Signed-off-by: Martin Schwidefsky