Ben Collins [Sun, 13 Jun 2004 06:11:37 +0000 (02:11 -0400)]
ieee1394: CSR1212 Extended ROM bug fixes
- Use vmalloc instead of kmalloc
- Change delayed_reset_bus() to operate in a work_queue instead of a timer
interrupt.
- Fix hpsb_allocate_and_register_addrspace() to not allocate space on top
of already allocated space.
- Fix problems in csr1212.c filling ConfigROM images when extend ROMs are
present.
Signed-off-by: Steve Kinneberg <kberg@linux1394.org> Signed-off-by: Ben Collins <bcollins@debian.org>
Kenneth W. Chen [Sat, 12 Jun 2004 23:49:20 +0000 (16:49 -0700)]
[PATCH] ia64: fix race in fsys_bubble_down to avoid fp-register corruption
The fast system-call fall-back-path has a race: it reads PSR, modifies
some bits, then writes back the new PSR. Unfortunately, the contents
of PSR may change between reading and writing it. For example, an
interrupt could occur which could trigger a context-switch. The
context-switch might in turn flush the floating-point-high (FPH)
partition to memory, clear PSR.MFH, and set PSR.DFH. To prevent this
race, the patch below turns off PSR.I before reading PSR.
This fixes a floating-point corruption problem that was observed on a
system with a libc which has the fast system-call support enabled.
The performance impact is minimal (on the order of a handful of cycles).
Signed-off-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Asit Mallick <asit.k.mallick@intel.com> Signed-off-by: David Mosberger <davidm@hpl.hp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:45:58 +0000 (16:45 -0700)]
[PATCH] ramdisk: buffer_uptodate fix
I waffled over this for ages. On balance, I think it's best to mark those
bh's as uptodate.
And on reflection, I'm not sure why we go bringing ramdisk blockdev pages
uptodate all over the place anyway. But ramdisk is weird and it passes
testing. Let those dogs sleep.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:45:44 +0000 (16:45 -0700)]
[PATCH] sparse fix for void return in selinux/hooks.c
From: Chris Wright <chrisw@osdl.org>
CHECK security/selinux/hooks.c
security/selinux/hooks.c:1383:34: warning: return expression in void function
security/selinux/hooks.c:3548:30: warning: return expression in void function
CC security/selinux/hooks.o
From: Mika Kukkonen <mika@osdl.org> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:44:32 +0000 (16:44 -0700)]
[PATCH] s390: cleanup string functions
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cleanup s390* string functions. This replaces the 31/64 bit assembler
files (strcmp[64].S, strcpy[64].S & strncpy[64].S) with a single string.c
file that uses some inline assemblies to issue the string instructions. In
addition some more of the generic string function got an architecture
dependent implementation.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:44:00 +0000 (16:44 -0700)]
[PATCH] s390: simplify single stepped svc code
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Introduce a TIF_SINGLE_STEP bit that causes do_debugger_trap to get called
at the end of a system call. This way some code duplication in the program
check handler can get removed.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:42:15 +0000 (16:42 -0700)]
[PATCH] dup_mmap() memory accounting fix
From: Hugh Dickins <hugh@veritas.com>
Oleg's patch was good in that exit_mmap usually does the un-accounting; but
dup_mmap still needs its own un-accounting for the case when it has charged
for a vma, but error before it's inserted into child mm's list.
Andrew Morton [Sat, 12 Jun 2004 23:41:17 +0000 (16:41 -0700)]
[PATCH] fix modprobe_path and hotplug_path sizes and sysctl
From: Andy Whitcroft <apw@shadowen.org>
Both modprobe_path and hotplug_path are arbitrarily sized at 256 bytes and
that size is also expressed directly in the sysctl code. It seems
reasonable to define a standard length and use that for consitancy. This
patch introduces the constant KMOD_PATH_LEN and uses that.
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:41:03 +0000 (16:41 -0700)]
[PATCH] Update Documentation/filesystems/Locking
From: Anton Altaparmakov <aia21@cam.ac.uk>
A filesystem's ->writepage() implementation nowadays must run either
redirty_page_for_writepage() or the combination of set_page_writeback()/
end_page_writeback(). Failure to do so leaves the page itself marked clean
but it is tagged as dirty in the radix tree (PAGECACHE_TAG_DIRTY). This
incoherency can lead to all sorts of hard-to-debug problems in the
filesystem like having dirty inodes at umount and losing written data.
The patch updates Documentation/filesystems/Locking to reflect this
requirement.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:39:25 +0000 (16:39 -0700)]
[PATCH] vmscan: try harder for GFP_NOFS allocators
Page reclaim bales out very early if reclaim isn't working out for !__GFP_FS
allocation attempts.
It was a fairly arbitrary thing in the first place and chances are the caller
will simply retry the allocation or will do something which is disruptive to
userspace. So remove that code and do much more scanning.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:39:11 +0000 (16:39 -0700)]
[PATCH] vmscan: handle synchronous writepage()
Teach page reclaim to understand synchronous ->writepage implementations.
If ->writepage completed I/O prior to returning we can proceed to reclaim the
page without giving it another trip around the LRU.
This is beneficial for ramdisk-backed S_ISREG files: we can reclaim the file's
pages as fast as the ramdisk driver needs to allocate them and this prevents
I/O errors due to OOM in rd_blkdev_pagecache_IO().
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:38:26 +0000 (16:38 -0700)]
[PATCH] Voyager doesn't support MCE
From: William Lee Irwin III <wli@holomorphy.com>
Voyager doesn't compile any of the APIC or IO-APIC -related code in
arch/i386/kernel/ at all -- so it's a logical impossibility that this could
ever work.
Cc: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 12 Jun 2004 23:38:11 +0000 (16:38 -0700)]
[PATCH] numaq mempolicy.c build fix
From: William Lee Irwin III <wli@holomorphy.com>
mm/mempolicy.c: In function `verify_pages':
mm/mempolicy.c:246: warning: implicit declaration of function `kmap_atomic'
mm/mempolicy.c:249: warning: implicit declaration of function `kunmap_atomic'
pte_offset_map() invokes kmap_atomic() via macro, without including the
required header.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tony Lindgren [Sat, 12 Jun 2004 22:11:28 +0000 (23:11 +0100)]
[ARM PATCH] 1908/1: Remove old OMAP header files
Patch from Tony Lindgren
This patch removes the following old files that have been renamed:
include/asm-arm/arch-omap/omap-h2.h
include/asm-arm/arch-omap/omap-innovator.h
include/asm-arm/arch-omap/omap-perseus2.h
Andrew Zabolotny [Sat, 12 Jun 2004 21:31:57 +0000 (22:31 +0100)]
[ARM PATCH] 1925/1: ARM 'System Type' kernel config menu cleanup
Patch from Andrew Zabolotny
This patch makes architecture-specific submenus under
"System Type" visible only if the corresponding architecture
is selected via the "ARM System Type" menu. Also comments
out IDE_POLL in mach-lh7a40x/Kconfig since it is undefined
and causes warnings during make menuconfig.
This patch syncs the mainline kernel with the linux-omap tree.
The highlights of the patch are:
- Register name clean-up. Mostly removes _REG from register names
and replace OMAP1510P1 with OMAP1510. Also moves IO macros
from hardware.h to io.h (Dirk Behme)
- Add DMA framebuffer hardware acceleration features (Imre Deak)
- Fix GPIO code not to do unnecessary address translations
between physical and virtual addresses (Juha Yrjölä)
- Misc updates, such as OMAP gpio export fixes, additional
multiplexing settings, include mach-types.h only where needed,
show OMAP revision early during boot
This patch syncs the mainline kernel with the linux-omap tree.
The highlights of the patch are:
- Register name clean-up. Mostly removes _REG from register names
and replace OMAP1510P1 with OMAP1510. Also moves IO macros
from hardware.h to io.h (Dirk Behme)
- Add DMA framebuffer hardware acceleration features (Imre Deak)
- Fix GPIO code not to do unnecessary address translations
between physical and virtual addresses (Juha Yrjölä)
- Misc updates, such as OMAP gpio export fixes, additional
multiplexing settings, include mach-types.h only where needed,
show OMAP revision early during boot
Russell King [Sat, 12 Jun 2004 21:13:21 +0000 (22:13 +0100)]
[ARM] Update ARM memory layout documentation.
This updates the memory layout documentation to indicate that certain
areas should remain unused. It also corrects a few minor errors with
region end addresses.
Linus Torvalds [Sat, 12 Jun 2004 12:29:44 +0000 (05:29 -0700)]
sparse cleanup of #include file
sparse tokenizes everything. Including #include
directives. Which means that it doesn't want to
see "//" in a include filename, since that's a
comment outside of a string.
Linus Torvalds [Sat, 12 Jun 2004 12:12:31 +0000 (05:12 -0700)]
Fix x86 "clear_cpu()" macro.
We need to clear all exceptions before synchronizing
with the FPU, since we aren't ready to handle a FP
exception here and we're getting rid of all FP state.
Special thanks to Alexander Nyberg for reports and
testing. Alternate patches by Sergey Vlasov and Andi
Kleen, who both worked on this.
Scott Feldman [Thu, 10 Jun 2004 15:30:13 +0000 (11:30 -0400)]
[PATCH] e100: fix sender hang after tx timeout
* When e100 experiences a transmit timeout, it calls e100_up() to reset
the device. e100_up calls netif_start_queue to release any flow block,
but doesn't reschedule. This patch unblocks the flow and schedules Tx.
Jay Vosburgh [fubar@us.ibm.com].
Scott Feldman [Thu, 10 Jun 2004 15:30:04 +0000 (11:30 -0400)]
[PATCH] e100: fix skb leak in tx timeout
* If e100 experiences a transmit timeout, and the tx ring is completely
full at the time, it will leak all of the skbs on the tx ring (because
extra logic is needed to distinguish ring full from ring empty). Jay
Vosburgh [fubar@us.ibm.com].
Scott Feldman [Thu, 10 Jun 2004 15:29:56 +0000 (11:29 -0400)]
[PATCH] e100: stepping over err return code
* Spotted by Jay Vosburgh [fubar@us.ibm.com]. err return code was getting
stepped on in the case where we need to report low or no cb resources,
which in turn messed up the netif_stop_queue logic in xmit_frame.
NTFS: 2.1.14 - Fix an NFSd caused deadlock reported by several users.
- Modify fs/ntfs/ntfs_readdir() to copy the index root attribute value
to a buffer so that we can put the search context and unmap the mft
record before calling the filldir() callback. We need to do this
because of NFSd which calls ->lookup() from its filldir callback()
and this causes NTFS to deadlock as ntfs_lookup() maps the mft record
of the directory and since ntfs_readdir() has got it mapped already
ntfs_lookup() deadlocks.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Dave Airlie [Sat, 12 Jun 2004 05:23:45 +0000 (15:23 +1000)]
gamma_dma_priority and gamma_dma_send_buffers both deref d->send_indices
and/or d->send_sizes. When these functions are called from gamma_dma,
these pointers are user pointers and are thus not safe to deref. This patch
copies over the pointers inside gamma_dma_priority and
gamma_dma_send_buffers.
Submitted-by: Robert T. Johnson <rtjohnso@eecs.berkeley.edu> Signed-off-by: Dave Airlie <airlied@linux.ie>
Jens Axboe [Thu, 10 Jun 2004 01:21:19 +0000 (18:21 -0700)]
[PATCH] fix ide-cd racy completions
This bug took forever to debug (just ask Ben :-).
When we move the completion event from the failed request to the sense
request, we risk either the initial complete and then later complete on
a long gone ->waiting. I think this business of moving the completion
structure to the request sense is a bit bogus and always has been, and
the bug is fixed nicely by just rewriting this logic a bit. So instead
we simply unconditionally dequeue the failed request (regardless of
whether it was REQ_PC or REQ_BLOCK_PC), and pass a reference to it in
the sense request. When the sense completes, we call end io on the
originally failed request (which does the complete() etc).
Dave Airlie [Wed, 9 Jun 2004 07:05:52 +0000 (17:05 +1000)]
The dev->devname being passed to request_irq in drm_irq.h is null.
With the old DRM interface, the devname was set in DRM(setunique),
but with the current DRM interface >=1.1 the devname is not being
set in DRM(set_busid).
From: Alan Swanson Approved-by: Dave Airlie <airlied@linux.ie>
Andrew Morton [Wed, 9 Jun 2004 01:19:04 +0000 (18:19 -0700)]
[PATCH] vga16fb.c: fix bogus mem_start value
From: Herbert Xu <herbert@gondor.apana.org.au>
The recent change to vga16fb's memory mapping that you partially reverted
is still broken. In particular, it's setting fix.mem_start to a virtual
address on i386. The value of fix.mem_start is meant to be physical.
We could simply apply virt_to_phys to it, but somehow I doubt that is what
it's meant to do on arm. So until we hear from someone who knows how it
works on arm, let's just revert this change.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:42 +0000 (18:18 -0700)]
[PATCH] fix uts sysctl write size
From: Andy Whitcroft <apw@shadowen.org>
The sysctl interfaces for updating the uts entries such as hostname and
domainname are using the wrong length for these buffers; they are hard
coded to 64. Although safe, this artifically limits the size of these
fields to one less than the true maximum. This generates an inconsistency
between the various methods of update for these fields.
The error originates from the fact the handler for strings (proc_dostring)
already allows for the string terminator. This patch corrects the limit,
taking the oppotunity to convert to use of sizeof().
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:31 +0000 (18:18 -0700)]
[PATCH] cyclone: PIT sanity checking
From: john stultz <johnstul@us.ibm.com>
In testing for SLES9, we ran across a bug caused by userspace apps poking
the PIT which caused bad values to be read by the kernel. This would then
trigger the lost tick detection code with insane values and would then
break the SCSI subsystem.
This patch includes the PIT sanity check from the TSC timesource into the
cyclone timesource code, which catches the bad case described above and
resolves the issue.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:18:10 +0000 (18:18 -0700)]
[PATCH] s390: add support for 6 system call arguments (FUTEX_CMP_REQUEUE)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
This patch adds support for 6 system call arguments on s390. The first
exploiter of this will be the sys_futex system call for the
FUTEX_CMP_REQUEUE operation. The idea is simple: use register %r7 for the
6th argument. This can be extended to 7/8/9/... arguments if there ever
will be the need for it. To call the system call function in the kernel
the additional arguments needs to get stored on the stack. 8 bytes are
added to the head of struct pt_regs. %r7 is stored to the additional field
for all system calls. The store is hidden in a
address-generation-interlock slot, it doesn't slow down the system call
path.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:58 +0000 (18:17 -0700)]
[PATCH] cdrom hardware defect mgt header length
From: Jens Axboe <axboe@suse.de>
cdrom_has_defect_mgt() has the same ->data_len bug - the length field is
not total length, but the length following that field. So it should be +
4, not + 8. However, just kill the length check. Comparison of
feature_code provides enough check.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:47 +0000 (18:17 -0700)]
[PATCH] md: fix BUG in raid6 resync code.
From: NeilBrown <neilb@cse.unsw.edu.au>
This condtion on this loop is primarily to avoid the loop if it doesn't
appear to be needed. However it optimises a little too much and there is a
case where it skips the loop when it is really needed. This patch fixes
it.
This is the raid6 version of the recent raid5 resync bugfix.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:36 +0000 (18:17 -0700)]
[PATCH] __ARCH_WANT_SYS_RT_SIGACTION fix
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Recent syscall stubs cleanup broke alpha, as it has its own version of
sys_rt_sigaction(). This defines __ARCH_WANT_SYS_RT_SIGACTION for all
architectures except alpha, sparc and sparc64.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:17:02 +0000 (18:17 -0700)]
[PATCH] more drivers/atm/horizon.c polishing
From: Francois Romieu <romieu@fr.zoreil.com>
- just say no to numbered labels;
- pci_enable_device can fail so setup_pci_dev() must return a value;
- propagate existing error codes when possible in do_pci_device()
- missing pci_disable_device here and there.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:28 +0000 (18:16 -0700)]
[PATCH] runtime selection of CONFIG_PARIDE_EPATC8
From: Christoph Hellwig <hch@lst.de>
drivers/block/paride/epat.c support two slightly different protocol
variants. Currently it's compile-time selected by CONFIG_PARIDE_EPATC8,
but this patch adds a epatc8 module option to allow runtime selection.
CONFIG_PARIDE_EPATC8 stays for now but I'd like to kill it int 2.7.
The basic patch is from the Debian kernel package (Author unknown) but I
reworked it a bit.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:17 +0000 (18:16 -0700)]
[PATCH] unalign struct page_state
The ____cacheline_aligned in there is a leftover from before the existence of
the percpu infrastructure. It bloats struct page_state and structures which
contain it enormously, and we use these things on the stack deep in page
reclaim.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:16:06 +0000 (18:16 -0700)]
[PATCH] writeback_inodes can race with unmount
From: Chris Mason <mason@suse.com>
There's a small window where the filesystem can be unmounted during
writeback_inodes. The end result is the iput done by sync_sb_inodes could
be done after the FS put_super and and the super has been removed from all
lists.
The fix is to hold the s_umount sem during sync_sb_inodes to make sure
the FS doesn't get unmounted.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:55 +0000 (18:15 -0700)]
[PATCH] ppc64: iSeries vio_dev cleanups
From: Stephen Rothwell <sfr@canb.auug.org.au>
This patch removes the archdata and driver_data members of struct vio_dev
and uses the platform_data and driver_data members of the embedded struct
device instead. I also declared a couple of routines static.
This is part of a work in progress.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:44 +0000 (18:15 -0700)]
[PATCH] ppc32: fix missing option in binutils version check
From: Olaf Hering <olh@suse.de>
The binutils check is bogus, it doesnt work with the just released
binutils. A space is needed in the error message.
pomegranate:~# echo dssall | /usr/bin/as -o /tmp/x
{standard input}: Assembler messages:
{standard input}:1: Error: Unrecognized opcode: `dssall'
pomegranate:~# /usr/bin/as -v
GNU assembler version 2.15.91.0.1 (powerpc-suse-linux) using BFD version 2.15.91.0.1 20040527 (SuSE Linux)
*** 2.6 kernels no longer buildcorrectly with old versions of binutils.
*** Please upgrade your binutils to 2.12.1 or newer
make: *** [checkbin] Error 1
make: Target `all' not remade because of errors.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 9 Jun 2004 01:15:22 +0000 (18:15 -0700)]
[PATCH] jbd: descriptor buffer state fix
Fix a problem discovered by Jeff Mahoney <jeffm@suse.com>, based on an initial
patch from Chris Mason <mason@suse.com>.
journal_get_descriptor_buffer() is used to obtain a regular old buffer_head
against the blockdev mapping. The caller will populate that bh by hand and
will then submit it for writing.
But there are problems:
a) The function sets bh->b_state nonatomically. But this buffer is
accessible to other CPUs via pagecache lookup.
b) The function sets the buffer dirty and then the caller populates it and
then it is submitted for I/O. Wrong order: there's a window in which the
VM could write the buffer before it is fully populated.
c) The function fails to set the buffer uptodate after zeroing it. And one
caller forgot to mark it uptodate as well. So if the VM happens to decide
to write the containing page back __block_write_full_page() encounters a
dirty, not uptodate buffer, which is an illegal state. This was generating
buffer_error() warnings before we removed buffer_error().
Leaving the buffer not uptodate also means that a concurrent reader of
/dev/hda1 could cause physical I/O against the buffer, scribbling on what
we just put in it.
So journal_get_descriptor_buffer() is changed to mark the buffer
uptodate, under the buffer lock.
I considered changing journal_get_descriptor_buffer() to return a locked
buffer but there doesn't seem to be a need for this, and both callers end up
using ll_rw_block() anyway, which requires that the buffer be unlocked again.
Note that the journal_get_descriptor_buffer() callers dirty these buffers with
set_buffer_dirty(). That's a bit naughty, because it could create dirty
buffers against a clean page - an illegal state. They really should use
mark_buffer_dirty() to dirty the page and inode as well. But all callers will
immediately write and clean the buffer anyway, so we can safely leave this
optimising cheat in place.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>