In a bunch of places we used file->f_dentry->d_inode->i_sem to protect
fdatasync et.al. Replaced with corrent file->f_mapping->host->i_sem - the
object we are protecting is address_space, so we want an exclusion that would
work for redirected ->i_mapping. For normal files (not coda, not bdev) it's
all the same, of course - there we have
A lot of places used to use ->f_dentry->d_inode->i_mapping all over the
place. Replaced with use of ->f_mapping. For now - just the places where we
literally could do search-and-replace.
presto_journal_close() switched to passing struct presto_file_data * instead
of bogus struct file *. The only field of struct file we used to look at was
file->private_data and most of the callers allocated on-stack struct file,
assigned file.private_data and passed the sucker to presto_journal_close().
Idiocy removed.
Looks like they started with case where the data they wanted all along was,
indeed, in ->private_data of already available struct file, so they just
passed pointer to struct file. And when they found that they need to call it
in other places where there was no such struct file, they'd done it the dumb
way instead of fixing the prototype...
Andrew Morton [Mon, 19 Jan 2004 02:05:49 +0000 (18:05 -0800)]
[PATCH] bdev: open() changes
The first of a series which move us toward blockdev hotplug support. After
these we have achieved the following:
a) For "normal" (not bdevfs) inodes of block devices we never look at
->i_mapping.
b) For the same inodes we only look at ->i_bdev in bd_acquire() where it's
used only as "here's what we'd found the last time" sort of cached value.
If it's NULL, we just recalculate it.
c) Lots of messy expressions had been trimmed down, while we are at it.
(a) and (b) allow us to start doing proper block hotplug - we can destroy the
association between inode and bdev at any time, unhash bdev in question and
have new open() do everything from scratch, without waiting for old opened
files to close. The goal is to be able to say "revoke everything over that
gendisk"/"revoke that partition" and have it do the right thing.
This patch:
Where the old code called (block device) ->open(inode, file), use
->open(inode->i_bdev->bd_inode, file). Changes in drivers:
* none to those that only used inode->i_bdev and inode->i_rdev in their
->open() (bdev->bd_inode->i_bdev == bdev, so we are OK)
* floppy.c and floppy98.c used to call permission(inode, ...) in
floppy_open(). Switched to permission(file->f_dentry->d_inode, ...)
Andrew Morton [Mon, 19 Jan 2004 02:05:15 +0000 (18:05 -0800)]
[PATCH] kyrofb support
From: Paul Mundt <lethal@linux-sh.org>
This patch adds support for the Kyro graphics boards (STG4000/PowerVR
3/etc= .) to 2.6. This is a direct port and substantial cleanup / rewrite
of the 2.4 driver that's available in the sh64 tree at linux-sh.bkbits.net.
Some of the overlay code and the STG4000 bits are still a bit ugly, so be
forewarned.
Andrew Morton [Mon, 19 Jan 2004 02:05:04 +0000 (18:05 -0800)]
[PATCH] SH Merge
From: Paul Mundt <lethal@linux-sh.org>
Here's a rather large update for SH (this is a bit large mainly since a
number of things have piled up, and Linus didn't want any of this during
feature freeze time). All of these changes are specific to the SH platform,
and as such, shouldn't effect any other platforms.
Bjorn Helgaas [Fri, 16 Jan 2004 22:03:20 +0000 (22:03 +0000)]
[SERIAL] make ACPI serial module unload work
Patch from Bjorn Helgaas
This patch makes ACPI serial ports work right when the serial driver
is built as a module. Previously, loading worked fine, but we
didn't clean up on module removal.
Bjorn Helgaas [Fri, 16 Jan 2004 21:56:06 +0000 (21:56 +0000)]
[SERIAL] make HCDP dependent on serial console
Patch from Bjorn Helgaas
I propose the following HCDP Kconfig patch. It makes HCDP
selectable only when serial console has been selected. One
desirable side effect is that both are then available only
when statically compiled in (i.e., not built as a module).
The HCDP support doesn't actually depend on IA64, but I left
that in for now because nobody else implements support for it
and I don't want people confused by a selectable option that
doesn't do anything. Maybe a "depends on EFI" or something
will be useful eventually.
Roland McGrath [Thu, 15 Jan 2004 12:47:18 +0000 (04:47 -0800)]
[PATCH] fix pdeath_signal SMP locking
Obviously almost noone uses the pdeath_signal feature, since this has gone
unnoticed for quite some time.
This patch calls the function that does the right locking for the context
of this call (inside exit_notify). The names of the signal.c entrypoints
are a little confusing.
David Mosberger [Thu, 15 Jan 2004 08:39:13 +0000 (00:39 -0800)]
ia64: Replace unwcheck shell-script with a Python script which works
correctly even on 32-bit hosts. As an added bonus, it's faster,
too. Run "unwcheck" by default, but for now, don't let unwcheck
errors cause the kernel build to fail.
David Jeffery [Thu, 15 Jan 2004 07:53:07 +0000 (02:53 -0500)]
[PATCH] ips fix for large mem 64bit machines
This patch fixes DMA bugs on x86-64 and ia64 machines. The driver was
using commands that only support 32bit addresses in places that could
return 64bit addresses. One place was DMAing off the stack. The other
place was causing problems on x86-64 machines by calling pci_map()
functions on a region allocated by pci_alloc_consistent().
David Jeffery [Thu, 15 Jan 2004 07:51:50 +0000 (02:51 -0500)]
[PATCH] ips 2/2: minor fixes
This patch fixes two minor bugs. It allows zero length write commands
through to devices. It also prevents the writing of any '\0'
characters at the end of version numbers to ips's /proc/scsi files.
James Bottomley [Thu, 15 Jan 2004 05:23:57 +0000 (00:23 -0500)]
g_NCR5380 - 2.6.0 - problem with reloading module
From: "Randy.Dunlap" <rddunlap@osdl.org>
The problem is that the detect function requests an IO region
of 16 bytes (at least when a command line override parameter is
used) but the release function only tries to release 8 bytes,
and this request isn't done because it doesn't match any allocated
IO region. [NCR53C400 extensions are not enabled, so
NCR5380_region_size is 8, not 16, but the request uses
NCR5380_region_size regardless.]
Fix: save the allocated region size in instance->n_io_ports and release
that size only;
Matthew Wilcox [Wed, 14 Jan 2004 06:47:05 +0000 (01:47 -0500)]
[PATCH] Re: Building sym 2.1.18f on linux/alpha
On Tue, Jan 13, 2004 at 06:02:08PM +0300, Sergey Tikhonov wrote:
> The final kernel could not pass linking stage with 2.1.18f version
> (included into 2.6.1 kernel patch).
> The linker complains that :
> drivers/built-in.o(.init.text+0x8cec): In function 'sym2_probe':
> : undfined reference to 'local symbols in discarded section .exit.text'
>
> I compared arch/alpha/kernel/vmlinux.lds.S with one from the i386 tree.
> The '.exit.text' and '.exit.data'
> sections were moved out of DISCARD attributes in the i386 version. I did
> the same with alpha version
> and it helped.
Thanks for this report; you uncovered a real bug. Actually two real
bugs; one is that parisc is not discarding the .init.text and .exit.text
sections (so I didn't notice this bug) and the other is that sym_detach
is marked __devexit, yet called from a __devinit function.
Jes Sorensen [Wed, 14 Jan 2004 03:26:25 +0000 (19:26 -0800)]
[PATCH] ia64: quiet down SMP boot messages
This patch gets rid of some superfluous printk's which get tedious on
machines with insane number of CPUs. The virtual/physical address bit
info is already available via /proc/pal, so there is no need to print
it at boot- time.
Bjorn Helgaas [Wed, 14 Jan 2004 03:18:29 +0000 (19:18 -0800)]
[PATCH] ia64: move HCDP under serial console #ifdef
Currently you can select HCDP independent of serial console. This
doesn't seem very useful, and makes the setup_serial_hcdp() reference
unresolved if the serial driver is built as a module.
CONFIG_SERIAL_8250_CONSOLE is only selectable if the serial core is
built in (SERIAL_8250=y), so this patch makes sure we don't try to
call setup_serial_hcdp() unless it is actually built in to the kernel.
(I think we should also make HCDP selection dependent on
SERIAL_8250_CONSOLE=y in Kconfig; I'll send a separate patch
for that since it's not ia64-specific.)
Jes Sorensen [Wed, 14 Jan 2004 02:56:03 +0000 (18:56 -0800)]
[PATCH] ia64: header cleanup
I fixed the code to compile with CONFIG_ACPI_NUMA and
!CONFIG_DISCONTIG since it's actually possible to compile that
configuration as well as cleaned up the #include usage a litte.
Marcel Holtmann [Wed, 14 Jan 2004 01:34:23 +0000 (02:34 +0100)]
[Bluetooth] Fix reference counting for incoming connections
The L2CAP reference counting must be increased by the RFCOMM module if an
incoming connection is accepted. If this is not done, it will be decreased
one time to often if the connection is terminated.
Krishna Kumar [Tue, 13 Jan 2004 15:26:01 +0000 (07:26 -0800)]
[XFRM]: Fix two bugs in xfrm_lookup()
- the found or allocated xfrm_states are not passed correctly to
xfrm_bundle_create (and to the subsequent frees in case of create
failing) if the first xfrm_tmpl_resolve failed and the second one
succeeded.
- error handling is wrong.
Remove duplicate/conflicting code now that netdev_register_notifier replays the
device registration events. Reorder initialization to avoid having to simplify error unwind
if /proc creation failed.
Change IPV6 to handle the new case where netdev events are replayed on registration:
* change code ordering so address configuration is ready before registration
(this was actually a bug in existing code)
* take out code that capture's existing devices, this is now done in the replay
* make notifier code local to addrconf.c so it can be have smaller scope
Marcel Holtmann [Tue, 13 Jan 2004 05:17:12 +0000 (06:17 +0100)]
[Bluetooth] Set disconnect timer for incoming ACL links
In general a Bluetooth stack that creates an ACL link should also take
care of its termination, but some Bluetooth devices think otherwise. The
problem is that the Bluetooth specification don't defines an ownership
of an ACL link and if nobody cares about it, two devices stay connected
even if there is no need. To avoid leftover ACL links the disconnect
timer must also be used for incoming connections, but it is set twice
the default disconnect timeout so the other side get enough time to
clean everything by itself.