Karsten Keil [Fri, 3 Feb 2006 11:04:48 +0000 (03:04 -0800)]
[PATCH] i4l: warning fixes
drivers/isdn/hisax/hscx_irq.c: In function `hscx_interrupt':
drivers/isdn/hisax/hscx_irq.c:201: warning: comparison is always 1 due to width of bit-field
It's due to
(PACKET_NOACK != bcs->tx_skb->pkt_type)
pkt_type is only three bit wide.
I think this should fix it for the moment, pkt_type 7 is not used yet and
this is only used internal in hisax.
Andrew Morton [Fri, 3 Feb 2006 11:04:47 +0000 (03:04 -0800)]
[PATCH] ip2main.c warning fixes
With Eric's "i386: Add a temporary to make put_user more type safe" patch we
get a pile of warnings out of ip2m1in.c:
drivers/char/ip2main.c: In function `ip2_ipl_ioctl':
drivers/char/ip2main.c:2910: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2911: warning: assignment makes integer from pointer without a cast
drivers/char/ip2main.c:2912: warning: assignment makes integer from pointer without a cast
etc.
This ioctl is copying the kernel virtual address of a large number of
functions out to userspace. Heaven knows why.
Rather than fixing the warnings, I think we'll just nuke that code.
The patch also fixes a couple of `defined but not used' warnings.
Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
By including version.h edac_mc was rebuilding on every incremental build.
Which defeats the point of incremental builds.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Fulghum [Fri, 3 Feb 2006 11:04:41 +0000 (03:04 -0800)]
[PATCH] new tty buffering locking fix
Change locking in the new tty buffering facility from using tty->read_lock,
which is currently ignored by drivers and thus ineffective. New locking
uses a new tty buffering specific lock enforced centrally in the tty
buffering code.
Two drivers (esp and cyclades) are updated to use the tty buffering
functions instead of accessing tty buffering internals directly. This is
required for the new locking to work.
Minor checks for NULL buffers added to
tty_prepare_flip_string/tty_prepare_flip_string_flags
Signed-off-by: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix to broken comment to synchronize_rcu() noted by Keith Owens. Also add
sentence noting that synchronize_sched() and synchronize_rcu() are not
necessarily identical.
Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com> Cc: Keith Owens <kaos@sgi.com> Cc: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Poetzl [Fri, 3 Feb 2006 11:04:37 +0000 (03:04 -0800)]
[PATCH] quota: fix error code for ext2_new_inode()
The quota check in ext2_new_inode() returns ENOSPC where it should return
EDQUOT instead.
Signed-off-by: Herbert Pötzl <herbert@13thfloor.at> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zhang, Yanmin [Fri, 3 Feb 2006 11:04:36 +0000 (03:04 -0800)]
[PATCH] Export cpu topology in sysfs
The patch implements cpu topology exportation by sysfs.
Items (attributes) are similar to /proc/cpuinfo.
1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
represent the physical package id of cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
represent the thread siblings to cpu X in the same physical package;
To implement it in an architecture-neutral way, a new source file,
driver/base/topology.c, is to export the 5 attributes.
If one architecture wants to support this feature, it just needs to
implement 4 defines, typically in file include/asm-XXX/topology.h.
The 4 defines are:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)
The type of **_id is int.
The type of siblings is cpumask_t.
To be consistent on all architectures, the 4 attributes should have
deafult values if their values are unavailable. Below is the rule.
1) physical_package_id: If cpu has no physical package id, -1 is the
default value.
2) core_id: If cpu doesn't support multi-core, its core id is 0.
3) thread_siblings: Just include itself, if the cpu doesn't support
HT/multi-thread.
4) core_siblings: Just include itself, if the cpu doesn't support
multi-core and HT/Multi-thread.
So be careful when declaring the 4 defines in include/asm-XXX/topology.h.
If an attribute isn't defined on an architecture, it won't be exported.
Peter Williams [Fri, 3 Feb 2006 11:04:33 +0000 (03:04 -0800)]
[PATCH] lib: Fix bug in int_sqrt() for 64 bit longs
The implementation of int_sqrt() assumes that longs have 32 bits. On
systems that have 64 bit longs this will result in gross errors when the
argument to the function is greater than 2^32 - 1 on such systems. I doubt
whether any such use is currently made of int_sqrt() but the attached patch
fixes the problem anyway.
Signed-off-by: Peter Williams <pwil3058@bigpond.com.au> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Herbert Poetzl [Fri, 3 Feb 2006 11:04:32 +0000 (03:04 -0800)]
[PATCH] quota: remove unused sync_dquots_dev()
The already removed sync_dquots_dev(dev,type) is still defined in the
no-quota case.
Signed-off-by: Herbert Pötzl <herbert@13thfloor.at> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
dean gaudet [Fri, 3 Feb 2006 11:04:30 +0000 (03:04 -0800)]
[PATCH] fcntl F_SETFL and read-only IS_APPEND files
There is code in setfl() which attempts to preserve the O_APPEND flag on
IS_APPEND files... however IS_APPEND files could also be opened O_RDONLY
and in that case setfl() should not require O_APPEND...
coreutils 5.93 tail -f attempts to set O_NONBLOCK even on regular files...
unfortunately if you try this on an append-only log file the result is
this:
I offer up the patch below as one way of fixing the problem... i've tested
it fixes the problem with tail -f but haven't really tested beyond that.
(I also reported the coreutils bug upstream... it shouldn't fail imho...
<https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=15473>)
Signed-off-by: dean gaudet <dean@arctic.org> Cc: Al Viro <viro@ftp.linux.org.uk> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Markus Lidel [Fri, 3 Feb 2006 11:04:29 +0000 (03:04 -0800)]
[PATCH] I2O: fix and workaround for Motorola/Freescale controller
- This controller violates the I2O spec for the I/O registers. The patch
contains a workaround which moves the registers to the proper location.
(originally author: Matthew Starzewski)
- If a message frame is beyond the mapped address range a error is
returned.
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Moyer [Fri, 3 Feb 2006 11:04:27 +0000 (03:04 -0800)]
[PATCH] fix O_DIRECT read of last block in a sparse file
Currently, if you open a file O_DIRECT, truncate it to a size that is not a
multiple of the disk block size, and then try to read the last block in the
file, the read will return 0. The problem is in do_direct_IO, here:
/* Handle holes */
if (!buffer_mapped(map_bh)) {
char *kaddr;
...
if (dio->block_in_file >=
i_size_read(dio->inode)>>blkbits) {
/* We hit eof */
page_cache_release(page);
goto out;
}
We shift off any remaining bytes in the final block of the I/O, resulting
in a 0-sized read. I've attached a patch that fixes this. I'm not happy
about how ugly the math is getting, so suggestions are more than welcome.
I've tested this with a simple program that performs the steps outlined for
reproducing the problem above. Without the patch, we get a 0-sized result
from read. With the patch, we get the correct return value from the short
read.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Suparna Bhattacharya <suparna@in.ibm.com> Cc: Mingming Cao <cmm@us.ibm.com> Cc: Joel Becker <Joel.Becker@oracle.com> Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Fri, 3 Feb 2006 11:04:23 +0000 (03:04 -0800)]
[PATCH] cpuset: fix sparse warning
kernel/cpuset.c:644:38: warning: non-ANSI function declaration of function 'cpuset_update_task_memory_state'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] v9fs: fix corner cases when flushing request
When v9fs_mux_rpc sends a 9P message, it may be put in the queue of unsent
request. If the user process receives a signal, v9fs_mux_rpc sets the
request error to ERREQFLUSH and assigns NULL to request's send message. If
the message was still in the unsent queue, v9fs_write_work would produce an
oops while processing it.
The patch makes sure that requests that are being flushed are moved to the
pending requests queue safely.
If a request is being flushed, don't remove it from the list of pending
requests even if it receives a reply before the flush is acknoledged. The
request will be removed during from the Rflush handler (v9fs_mux_flush_cb).
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Two symlink fixes, v9fs_readlink didn't copy the last character of the
symlink name, v9fs_vfs_follow_link incorrectly called strlen of newly
allocated buffer instead of PATH_MAX.
There is a code path that passed size to ext2_xattr_set
(ext3_xattr_set_handle) before initializing it. The callees don't use the
value in that case, but gcc cannot tell. Always initialize size to get rid
of the warnings.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Jones [Fri, 3 Feb 2006 11:04:11 +0000 (03:04 -0800)]
[PATCH] EDAC config cleanup
The AMD76x chipsets aren't used in 64-bit, so don't offer the driver to the
user.
Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix the problem in kernel 2.6.15.1 (and early versions) that OProfile on
x86_64 does not correctly collect the stack traces for kernel functions.
The original code in valid_kernel_stack() in arch/i386/oprofile/backtrace.c
assumes that the frame pointer (headaddr) should be greater than stack
(i.e., regs).
This assumption is wrong for x86_64 because NMIs in x86_64 use a seperate
stack different from the kernel stack. Therefore, the variable stack now
points to some location on the NMI stack, which turns out to be at a higher
address than the frame pointer (headaddr) on the kernel stack. The correct
comparison here should be between headaddr and regs->rsp for x86_64.
Signed-off-by: Tong Li <tong.n.li@intel.com> Cc: John Levon <levon@movementarian.org> Cc: Philippe Elie <phil.el@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sb_find_get_block() ordinarily returns a buffer_head with b_count>=2, and
this code assume that in case if "b_count>1" buffer is used, so this caused
infinite loop.
(akpm: that is-the-buffer-busy code is incomprehensible. Good riddance. Use
of block_truncate_page() seems sane).
"rm" command, on file system with "ufs1" type cause system hang up. This
is, in fact, not so bad as it seems to be, because of after that in "kernel
control path" there are 3-4 places which may cause "oops".
So the first patch fix oopses, and the second patch fix "kernel hang up".
"oops" appears because of reading of group's summary info partly wrong, and
access to not first group's summary info cause "oops".
Andrew Morton [Fri, 3 Feb 2006 11:04:04 +0000 (03:04 -0800)]
[PATCH] sx.c printk warning fixes
drivers/char/sx.c: In function `sx_set_real_termios':
drivers/char/sx.c:934: warning: long unsigned int format, different type arg (arg 2)
drivers/char/sx.c:961: warning: long unsigned int format, different type arg (arg 2)
drivers/char/sx.c:976: warning: long unsigned int format, different type arg (arg 2)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 3 Feb 2006 11:04:03 +0000 (03:04 -0800)]
[PATCH] quota_v2: printk warning fixes
fs/quota_v2.c: In function `v2_check_quota_file':
fs/quota_v2.c:39: warning: int format, different type arg (arg 2)
fs/quota_v2.c:39: warning: int format, different type arg (arg 3)
Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 3 Feb 2006 11:04:02 +0000 (03:04 -0800)]
[PATCH] parport_serial: printk warning fix
drivers/parport/parport_serial.c: In function `parport_register':
drivers/parport/parport_serial.c:334: warning: unsigned int format, different type arg (arg 3)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 3 Feb 2006 11:03:58 +0000 (03:03 -0800)]
[PATCH] sx.c warning fixes
drivers/char/sx.c: In function `sx_set_real_termios':
drivers/char/sx.c:934: warning: int format, long unsigned int arg (arg 2)
drivers/char/sx.c:961: warning: unsigned int format, tcflag_t arg (arg 2)
drivers/char/sx.c:976: warning: unsigned int format, tcflag_t arg (arg 2)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Zach Brown [Fri, 3 Feb 2006 11:03:56 +0000 (03:03 -0800)]
[PATCH] list.h: don't evaluate macro args multiple times
I noticed that list.h init functions were evaluating macro arguments
multiple times and thought it might be nice to protect the unsuspecting
caller. Converting the macros to inline functions seems to reduce code
size, too. A i386 defconfig build with gcc 3.3.3 from fc4:
text data bss dec hex filename 3573148 565664 188828 4327640 4208d8 vmlinux.before 3572177 565664 188828 4326669 42050d vmlinux
Keith Owens [Fri, 3 Feb 2006 11:03:53 +0000 (03:03 -0800)]
[PATCH] Tell kallsyms_lookup_name() to ignore type U entries
When one module exports a function symbol and another module uses that
symbol then kallsyms shows the symbol twice. Once from the consumer with a
type of 'U' and once from the provider with a type of 't' or 'T'. On most
architectures, both entries have the same address so it does not matter
which one is returned by kallsyms_lookup_name(). But on architectures with
function descriptors, the 'U' entry points to the descriptor, not to the
code body, which is not what we want.
IA64 # grep -w qla2x00_remove_one /proc/kallsyms a000000208c25ef8 U qla2x00_remove_one [qla2300] <= descriptor a000000208bf44c0 t qla2x00_remove_one [qla2xxx] <= function body
Tell kallsyms_lookup_name() to ignore type U entries in modules.
Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Heiko Carstens [Fri, 3 Feb 2006 11:03:52 +0000 (03:03 -0800)]
[PATCH] s390: fix compat syscall wrapper
Patch 9ad11ab48b1ad618bf47076e9e579f267f5306c2 changes the type of the first
argument of some compat syscalls from int to unsigned int. Add these changes
to the s390 compat wrapper as well.
Heiko Carstens [Fri, 3 Feb 2006 11:03:51 +0000 (03:03 -0800)]
[PATCH] s390: compile fix: missing defines in asm-s390/io.h
Compile fix: add missing __raw_read* and __raw_write* defines to
include/asm-s390/io.h.
These are mandatory since patch c27a0d75b33c030965cc97d3d7f571107a673fb4
was merged.
The DASD extended error reporting is a facility that allows to get detailed
information about certain problems in the DASD I/O. This information can be
used to implement fail-over applications that can recover these problems.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Thibaut VARENE [Fri, 3 Feb 2006 11:03:48 +0000 (03:03 -0800)]
[PATCH] ide: restore support for AEC6280M cards in aec62xx.c
This patch adds missing initialization sequence, necessary to get the
"Macintosh" version of AEC6280 cards to work in Linux. Without this patch,
the driver hangs for several minutes trying to initialize the card and the
kernel is left in an unstable state. This patch has been tested fine on
ppc and i386.
Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
CC drivers/mtd/maps/dc21285.o
drivers/mtd/maps/dc21285.c: In function `dc21285_copy_to_32':
drivers/mtd/maps/dc21285.c:113: error: invalid lvalue in increment
drivers/mtd/maps/dc21285.c: In function `dc21285_copy_to_16':
drivers/mtd/maps/dc21285.c:124: error: invalid lvalue in increment
drivers/mtd/maps/dc21285.c: In function `dc21285_copy_to_8':
drivers/mtd/maps/dc21285.c:134: error: invalid lvalue in increment
make[3]: *** [drivers/mtd/maps/dc21285.o] Error 1
Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Jones [Fri, 3 Feb 2006 11:03:44 +0000 (03:03 -0800)]
[PATCH] Fix build failure in recent pm_prepare_* changes.
kernel/power/power.h:49: error: static declaration of 'pm_prepare_console' follows non-static declaration
include/linux/suspend.h:46: error: previous declaration of 'pm_prepare_console' was here
kernel/power/power.h:50: error: static declaration of 'pm_restore_console' follows non-static declaration
include/linux/suspend.h:47: error: previous declaration of 'pm_restore_console' was here
Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Fix deadlock in function-return probes
When two function-return probes are inserted on kfree()[1] and the second
on say, sys_link()[2], and later [2] is unregistered, we have a deadlock as
kfree is called with the kretprobe_lock held and the function-return probe
on kfree will also try to grab the same lock.
However, we can move the kfree() during unregistration to outside the
spinlock as we are sure that no instances from the free list will be used
after synchronized_sched() returns during the unregistration process.
Thanks to Masami Hiramatsu for spotting this.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Fri, 3 Feb 2006 11:03:41 +0000 (03:03 -0800)]
[PATCH] md: Assorted little md fixes
- version-1 superblock
+ The default_bitmap_offset is in sectors, not bytes.
+ the 'size' field in the superblock is in sectors, not KB
- raid0_run should return a negative number on error, not '1'
- raid10_read_balance should not return a valid 'disk' number if
->rdev turned out to be NULL
- kmem_cache_destroy doesn't like being passed a NULL.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linas Vepstas [Fri, 3 Feb 2006 11:03:38 +0000 (03:03 -0800)]
[PATCH] Clean up Documentation/driver-model/overview.txt
Edits to the driver-model documentation for grammar, clarity and content.
These docs haven't been updated in years, and some of the technical content
and discussion has become stale; this patch updates these. In addition,
some of the language is awkward. Fix this.
(I'm trying to cleanup the other files in this directory also,
patches for these will come a bit later).
Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Acked-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stefan Bader [Thu, 2 Feb 2006 22:28:07 +0000 (14:28 -0800)]
[PATCH] device-mapper log bitset: fix big endian find_next_zero_bit
This is a fix to the device-mapper-log-bitset-fix-endian patch that
switched to ext2_* versions of the set and clear bit functions. The
find_next_zero_bit function also has to be the ext2 one. Otherwise the
mirror target tries to recover non-existent regions beyond the end of
device.
Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Thu, 2 Feb 2006 22:28:05 +0000 (14:28 -0800)]
[PATCH] md: Don't remove bitmap from md array when switching to read-only
While a read-only array doesn't not really need a bitmap, we should
not remove the bitmap when switching an array to read-only because
a/ There is no code to re-add the bitmap which switching to read-write,
b/ There is insufficient locking - the bitmap could be accessed while it is
being removed.
Cc: Reuben Farrelly <reuben-lkml@reub.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Thu, 2 Feb 2006 22:28:03 +0000 (14:28 -0800)]
[PATCH] md: Fix device-size updates in md
As 'array_size' is a 'sector_t', it may overflow inappropriately when shifted
10 bits. So We should cast it to a loff_t first.
There are two places with this problem, but the second (in update_raid_disks)
isn't needed so just remove it:
The only personality that handles ->reshape currently is raid1,
and it doesn't change the size of the array.
When added for raid5/6, reshape again won't change the size of the array,
at least not straight away.
This code might be need for reshaping 'linear' but linear->shape,
if implemented, should probably do the i_size_write itself.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeremy Higdon [Thu, 2 Feb 2006 08:00:46 +0000 (00:00 -0800)]
[PATCH] Fix sgiioc4 DMA timeout problem with 64KiB s/g elements.
Problem caused by the fact that the code used to only pick the low 16
bits of the bytecount. That may be how some controllers act on it (byte
count of 0 means 0x10000), but not for this particular hardware.
Dave Airlie [Thu, 2 Feb 2006 08:37:46 +0000 (19:37 +1100)]
sem2mutex: drivers/char/drm/
From: Arjan van de Ven <arjan@infradead.org>
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Most of the 64 bit architectures will zero extend the first argument to
compat_sys_{openat,newfstatat,futimesat} which will fail if the 32 bit
syscall was passed AT_FDCWD (which is a small negative number). Declare
the first argument to be an unsigned int which will force the correct
sign extension when the internal functions are called in each case.
Also, do some small white space cleanups in fs/compat.c.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Trond Myklebust [Wed, 1 Feb 2006 17:19:27 +0000 (12:19 -0500)]
SUNRPC: Move upcall out of auth->au_ops->crcreate()
This fixes a bug whereby if two processes try to look up the same auth_gss
credential, they may end up creating two creds, and triggering two upcalls
because the upcall is performed before the credential is added to the
credcache.
Trond Myklebust [Wed, 1 Feb 2006 17:18:44 +0000 (12:18 -0500)]
SUNRPC: rpc_timeout_upcall_queue should not sleep
The function rpc_timeout_upcall_queue runs from a workqueue, and hence
sleeping is not recommended. Convert the protection of the upcall queue
from being mutex-based to being spinlock-based.