dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1887 Commits

Author SHA1 Message Date
Jeff Moyer 35dc8161d0 [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>
2006-02-03 08:32:07 -08:00
Carsten Otte 835417967c [PATCH] ext2: print xip mount option in ext2_show_options
In case we have CONFIG_FS_XIP, ext2_show_options shows "xip" if
EXT2_MOUNT_XIP mount flag is set.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:07 -08:00
schwab@suse.de a18546110e [PATCH] disable per cpu intr in /proc/stat
Don't compute and display the per-irq sums on ia64 either, too much
overhead for mostly useless figures.

Cc: Olaf Hering <olh@suse.de>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:07 -08:00
Latchesar Ionkov 034b91a3b6 [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>
2006-02-03 08:32:06 -08:00
Latchesar Ionkov 05818a004a [PATCH] v9fs: v9fs_put_str fix
v9fs_put_str used to store pointer to the source string, instead of the
cbuf copy.  This patch corrects it.

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>
2006-02-03 08:32:06 -08:00
Latchesar Ionkov 93c615feff [PATCH] v9fs: symlink support fixes
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.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:06 -08:00
Felix Oxley bd3bfeb58a [PATCH] fs/jffs/intrep.c: 255 is unsigned char
Signed-off-by: Felix Oxley <lkml@oxley.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:05 -08:00
Andreas Gruenbacher dfa08592ca [PATCH] Fix two ext[23] uninitialized warnings
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>
2006-02-03 08:32:05 -08:00
Marcelo Tosatti 47ba87e0b1 [PATCH] make "struct d_cookie" depend on CONFIG_PROFILING
Shrinks "struct dentry" from 128 bytes to 124 on x86, allowing 31 objects
per slab instead of 30.

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>
2006-02-03 08:32:04 -08:00
Evgeniy Dushistov 09114eb8c5 [PATCH] ufs: fix hang during `rm'
This fixes the code like this:

	bh = sb_find_get_block (sb, tmp + j);
	if ((bh && DATA_BUFFER_USED(bh)) || tmp != fs32_to_cpu(sb, *p)) {
		retry = 1;
		brelse (bh);
		goto next1;
	}
	bforget (bh);

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).

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:04 -08:00
Evgeniy Dushistov e295cfcb29 [PATCH] ufs: fix oops with `ufs1' type
"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".

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:04 -08:00
Andrew Morton 8c17e1eb05 [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>
2006-02-03 08:32:03 -08:00
Vitaly Fertman d35c602870 [PATCH] someone broke reiserfs V3 mount options, this fixes it
Signed-off-by: Hans Reiser <reiser@namesys.com>
Signed-off-by: Vitaly Fertman <vitaly@namesys.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:03 -08:00
Trond Myklebust 33052057e3 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-02-02 21:51:52 -05:00
Stephen Rothwell 9ad11ab48b [PATCH] compat: fix compat_sys_openat and friends
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>
2006-02-01 22:04:33 -08:00
Steve French e6da74e1f2 Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-02-01 12:16:53 -08:00
Dirk Mueller 1935245655 NFSv3: fix sync_retry in direct i/o NFS
Only do a sync_retry if the memcmp failed.

 Signed-off-by: Dirk Mueller <dmueller@suse.com>
 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-02-01 12:52:25 -05:00
Trond Myklebust aaaa99423b NLM: Ensure that nlmclnt_cancel_callback() doesn't loop forever
If the server returns NLM_LCK_DENIED_NOLOCKS, we currently retry the
 entire NLM_CANCEL request. This may end up looping forever unless the
 server changes its mind (why would it do that, though?).

 Ensure that we limit the number of retries (to 3).

 See bug# 5957 in bugzilla.kernel.org.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-02-01 12:52:23 -05:00
Trond Myklebust 16fb24252a NLM: Fix arguments to NLM_CANCEL call
The OpenGroup docs state that the arguments "block", "exclusive" and
 "alock" must exactly match the arguments for the lock call that we are
 trying to cancel.
 Currently, "block" is always set to false, which is wrong.

 See bug# 5956 on bugzilla.kernel.org.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-02-01 12:52:23 -05:00
Martin Waitz 7045f37b17 [PATCH] DocBook: fix some kernel-doc comments in fs and block
Update some parameter descriptions to actually match the code.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:27 -08:00
Jeff Mahoney fa385bef25 [PATCH] reiserfs: reiserfs: check for files > 2GB on 3.5.x disks
When a filesystem has been converted from 3.5.x to 3.6.x, we need an extra
check during file write to make sure we are not trying to make a 3.5.x file
> 2GB.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Chris Mason 6ae1ea447d [PATCH] reiserfs: reiserfs fix journal accounting in journal_transaction_should_end
reiserfs: journal_transaction_should_end should increase the count of
blocks allocated so the transaction subsystem can keep new writers from
creating a transaction that is too large.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Chris Mason 3d4492f81d [PATCH] reiserfs: reiserfs write_ordered_buffers should not oops on dirty non-uptodate bh
write_ordered_buffers should handle dirty non-uptodate buffers without a
BUG()

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Chris Mason e0e851cf30 [PATCH] reiserfs: reiserfs hang and performance fix for data=journal mode
In data=journal mode, reiserfs writepage needs to make sure not to trigger
transactions while being run under PF_MEMALLOC.  This patch makes sure to
redirty the page instead of forcing a transaction start in this case.

Also, calling filemap_fdata* in order to trigger io on the block device can
cause lock inversions on the page lock.  Instead, do simple batching from
flush_commit_list.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Chris Mason fc5cd582e9 [PATCH] reiserfs: zero b_private when allocating buffer heads
The b_private field in buffer heads needs to be zero filled when the
buffers are allocated.  Thanks to Nathan Scott for finding this.  It was
causing problems on systems with both XFS and reiserfs.

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Chris Mason d62b1b87a7 [PATCH] resierfs: fix reiserfs_invalidatepage race against data=ordered
After a transaction has closed but before it has finished commit, there is
a window where data=ordered mode requires invalidatepage to pin pages
instead of freeing them.  This patch fixes a race between the
invalidatepage checks and data=ordered writeback, and it also adds a check
to the reiserfs write_ordered_buffers routines to write any anonymous
buffers that were dirtied after its first writeback loop.

That bug works like this:

proc1: transaction closes and a new one starts
proc1: write_ordered_buffers starts processing data=ordered list
proc1: buffer A is cleaned and written
proc2: buffer A is dirtied by another process
proc2: File is truncated to zero, page A goes through invalidatepage
proc2: reiserfs_invalidatepage sees dirty buffer A with reiserfs
       journal head, pins it
proc1: write_ordered_buffers frees the journal head on buffer A

At this point, buffer A stays dirty forever

Signed-off-by: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:26 -08:00
Christoph Hellwig ec191574b9 [PATCH] reiserfs: use generic_permission
Use the generic_permission code with a proper wrapper and callback instead
of having a local copy.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:25 -08:00
Christoph Hellwig c87d0c07ea [PATCH] reiserfs: remove reiserfs_permission_locked
This function is completely unused since the xattr permission checking
changes.  Remove it and fold __reiserfs_permission into
reiserfs_permission.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:25 -08:00
Diego Calleja e5dd259f78 [PATCH] reiserfs: missing kmalloc failure check
According to http://bugzilla.kernel.org/show_bug.cgi?id=5778
fs/reiserfs/file.c is missing this check.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:25 -08:00
Pekka Enberg 8c777cc4be [PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation
This patch replaces yield and retry loop with __GFP_NOFAIL in
alloc_journal_list().

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:25 -08:00
Pekka Enberg d739b42b82 [PATCH] reiserfs: remove kmalloc wrapper
Remove kmalloc() wrapper from fs/reiserfs/.  Please note that a reiserfs
/proc entry format is changed because kmalloc statistics is removed.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:25 -08:00
Christoph Lameter e965f9630c [PATCH] Direct Migration V9: Avoid writeback / page_migrate() method
Migrate a page with buffers without requiring writeback

This introduces a new address space operation migratepage() that may be used
by a filesystem to implement its own version of page migration.

A version is provided that migrates buffers attached to pages.  Some
filesystems (ext2, ext3, xfs) are modified to utilize this feature.

The swapper address space operation are modified so that a regular
migrate_page() will occur for anonymous pages without writeback (migrate_pages
forces every anonymous page to have a swap entry).

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:17 -08:00
Hugh Dickins 4e6a510a74 [PATCH] mm: hugepage accounting fix
2.6.15's hugepage faulting introduced huge_pages_needed accounting into
hugetlbfs: to count how many pages are already in cache, for spot check on
how far a new mapping may be allowed to extend the file.  But it's muddled:
each hugepage found covers HPAGE_SIZE, not PAGE_SIZE.  Once pages were
already in cache, it would overshoot, wrap its hugepages count backwards,
and so fail a harmless repeat mapping with -ENOMEM.  Fixes the problem
found by Don Dupuis.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-By: Adam Litke <agl@us.ibm.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:15 -08:00
Alexey Dobriyan 537421be79 [PATCH] Mark CONFIG_UFS_FS_WRITE as BROKEN
OpenBSD doesn't see "." correctly in directories created by Linux.  Copying
files over several KB will buy you infinite loop in __getblk_slow().
Copying files smaller than 1 KB seems to be OK.  Sometimes files will be
filled with zeros.  Sometimes incorrectly copied file will reappear after
next file with truncated size.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:14 -08:00
Andrew Morton cb82a6cdf9 [PATCH] compat_sys_pselect7() fix
fs/compat.c: In function `compat_sys_pselect7':
fs/compat.c:1820: warning: passing arg 5 of `compat_core_sys_select' from incompatible pointer type

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:10 -08:00
Miklos Szeredi 9cd6845511 [PATCH] fuse: fix async read for legacy filesystems
While asynchronous reads mean a performance improvement in most cases, if
the filesystem assumed that reads are synchronous, then async reads may
degrade performance (filesystem may receive reads out of order, which can
confuse it's own readahead logic).

With sshfs a 1.5 to 4 times slowdown can be measured.

There's also a need for userspace filesystems to know whether asynchronous
reads are supported by the kernel or not.

To achive these, negotiate in the INIT request whether async reads will be
used and the maximum readahead value.  Update interface version to 7.6

If userspace uses a version earlier than 7.6, then disable async reads, and
set maximum readahead value to the maximum read size, as done in previous
versions.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:09 -08:00
Andrew Morton caf736085f [PATCH] smbfs readdir vs signal fix
An old patch designed to fix http://bugme.osdl.org/show_bug.cgi?id=4497,
"getdents gives empty/random result upon signal".

If smbfs's readdir() is interupted by a signal, smb_readdir() failed to
noticed that and proceeded to treat the unread-into page as valid directory
contents.  Fix that up by handling the -ERESTARTSYS.

Thanks to Stian Skjelstad for reporting and testing.

Cc: Stian Skjelstad <stian@nixia.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:09 -08:00
Andreas Gruenbacher 3fb803a990 [PATCH] knfsd: Restore recently broken ACL functionality to NFS server
A recent patch to
   Allow run-time selection of NFS versions to export

meant that NO nfsacl service versions were exported.  This patch restored
that functionality.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:09 -08:00
Linus Torvalds fa3c791d85 Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2006-01-31 19:30:48 -08:00
Nathan Scott fad3aa1e8e [XFS] Fix regression in xfs_buf_rele dealing with non-hashed buffers, as
occur during log replay.  Novell bug 145204, Fedora bug 177848.

SGI-PV: 948860
SGI-Modid: xfs-linux-melb:xfs-kern:25064a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-01 12:14:52 +11:00
Yingping Lu 3a69c7dc6f [XFS] Interim solution for attribute insertion failure during file
creation due to ENOSPC. The current solution removes the inode when the
attribute insertion fails. Long term solution would be to make the inode
creation and attribute insertion atomic.

SGI-PV: 947610
SGI-Modid: xfs-linux-melb:xfs-kern:205193a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-02-01 12:14:34 +11:00
Jens Axboe fddfdeafa8 [BLOCK] A few kerneldoc fixups
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-31 15:24:34 +01:00
Steve French 1877c9ea66 [CIFS] Remove compiler warning
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-27 18:36:11 -08:00
Steve French eb9bdaa3f3 Signed-off-by: Steve French <sfrench@us.ibm.com> 2006-01-27 15:11:47 -08:00
Steve French 17cbbafe8e [CIFS] Make cifs default wsize match what we actually want to send (52K
typically - header + 13 pages).

Forgetting to set wsize on the mount command costs more than 10% on large
write (can be much more) so this makes a saner default.  We still shrink
this default smaller if server can not support it.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-24 20:26:48 -08:00
Steve French 4c8af5254e Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-23 12:51:00 -08:00
Steve French 0820e15a35 [CIFS] Do not zero non-existent iovec in SendReceive response processing.
Could cause memory leak in some readpaths depending on what junk followed it in the stack.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-23 12:50:04 -08:00
David S. Miller 7e732bfc55 [PATCH] Fix regression added by ppoll/pselect code.
The compat layer timeout handling changes in:

9f72949f67

are busted.  This is most easily seen with an X application
that uses sub-second select/poll timeout such as emacs.  You
hit a key and it takes a second or so before the app responds.

The two ROUND_UP() calls upon entry are using {tv,ts}_sec where it
should instead be using {tv_usec,ts_nsec}, which perfectly explains
the observed incorrect behavior.

Another bug shot down with git bisect.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-19 22:11:31 -08:00
Anton Altaparmakov 944d79559d Merge branch 'master' of /usr/src/ntfs-2.6/ 2006-01-19 16:39:33 +00:00
Linus Torvalds 0f36b018b2 Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6 2006-01-18 19:37:57 -08:00
Alan Cox 715b49ef2d [PATCH] EDAC: atomic scrub operations
EDAC requires a way to scrub memory if an ECC error is found and the chipset
does not do the work automatically.  That means rewriting memory locations
atomically with respect to all CPUs _and_ bus masters.  That means we can't
use atomic_add(foo, 0) as it gets optimised for non-SMP

This adds a function to include/asm-foo/atomic.h for the platforms currently
supported which implements a scrub of a mapped block.

It also adjusts a few other files include order where atomic.h is included
before types.h as this now causes an error as atomic_scrub uses u32.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:30 -08:00
David Woodhouse 9f72949f67 [PATCH] Add pselect/ppoll system call implementation
The following implementation of ppoll() and pselect() system calls
depends on the architecture providing a TIF_RESTORE_SIGMASK flag in the
thread_info.

These system calls have to change the signal mask during their
operation, and signal handlers must be invoked using the new, temporary
signal mask. The old signal mask must be restored either upon successful
exit from the system call, or upon returning from the invoked signal
handler if the system call is interrupted. We can't simply restore the
original signal mask and return to userspace, since the restored signal
mask may actually block the signal which interrupted the system call.

The TIF_RESTORE_SIGMASK flag deals with this by causing the syscall exit
path to trap into do_signal() just as TIF_SIGPENDING does, and by
causing do_signal() to use the saved signal mask instead of the current
signal mask when setting up the stack frame for the signal handler -- or
by causing do_signal() to simply restore the saved signal mask in the
case where there is no handler to be invoked.

The first patch implements the sys_pselect() and sys_ppoll() system
calls, which are present only if TIF_RESTORE_SIGMASK is defined. That
#ifdef should go away in time when all architectures have implemented
it. The second patch implements TIF_RESTORE_SIGMASK for the PowerPC
kernel (in the -mm tree), and the third patch then removes the
arch-specific implementations of sys_rt_sigsuspend() and replaces them
with generic versions using the same trick.

The fourth and fifth patches, provided by David Howells, implement
TIF_RESTORE_SIGMASK for FR-V and i386 respectively, and the sixth patch
adds the syscalls to the i386 syscall table.

This patch:

Add the pselect() and ppoll() system calls, providing core routines usable by
the original select() and poll() system calls and also the new calls (with
their semantics w.r.t timeouts).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:30 -08:00
Ulrich Drepper 5590ff0d55 [PATCH] vfs: *at functions: core
Here is a series of patches which introduce in total 13 new system calls
which take a file descriptor/filename pair instead of a single file
name.  These functions, openat etc, have been discussed on numerous
occasions.  They are needed to implement race-free filesystem traversal,
they are necessary to implement a virtual per-thread current working
directory (think multi-threaded backup software), etc.

We have in glibc today implementations of the interfaces which use the
/proc/self/fd magic.  But this code is rather expensive.  Here are some
results (similar to what Jim Meyering posted before).

The test creates a deep directory hierarchy on a tmpfs filesystem.  Then
rm -fr is used to remove all directories.  Without syscall support I get
this:

real    0m31.921s
user    0m0.688s
sys     0m31.234s

With syscall support the results are much better:

real    0m20.699s
user    0m0.536s
sys     0m20.149s

The interfaces are for obvious reasons currently not much used.  But they'll
be used.  coreutils (and Jeff's posixutils) are already using them.
Furthermore, code like ftw/fts in libc (maybe even glob) will also start using
them.  I expect a patch to make follow soon.  Every program which is walking
the filesystem tree will benefit.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:29 -08:00
Christoph Hellwig e2f99018eb [PATCH] exportfs: add find_acceptable_alias helper
find_exported_dentry contains two duplicate loops to find an alias that the
acceptable callback likes.  Split this out to a new helper and switch from
list_for_each to list_for_each_entry to make it more readable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:28 -08:00
David Shaw 846f2fcd77 [PATCH] knfsd: Provide missing NFSv2 part of patch for checking vfs_getattr.
A recent patch which checked the return status of vfs_getattr in nfsd,
completely missed the nfsproc.c (NFSv2) part.  Here is it.

This patch moved the call to vfs_getattr from the xdr encoding (at which point
it is too late to return an error) to the call handling.  This means several
calls to vfs_getattr are needed in nfsproc.c.  Many are encapsulated in
nfsd_return_attrs and nfsd_return_dirop.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:28 -08:00
NeilBrown 45bd3b3dff [PATCH] knfsd: Fix some more errno/nfserr confusion in vfs.c
nfsd_sync* return an errno, which usually needs to be converted to an errno,
sometimes immediately, sometimes a little later.

Also, nfsd_setattr returns an nfserr which SHOULDN'T be converted from
an errno (because it isn't one).

Also some tidyups of the form:
  err = XX
  err = nfserrno(err)
and
  err = XX
  if (err)
      err = nfserrno(err)
become
  err = nfserrno(XX)

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:28 -08:00
Al Viro 7fcd53303d [PATCH] nfsd4_lock() returns bogus values to clients
missing nfserrno() in default case of a switch by return value of
posix_lock_file(); as the result we send negative host-endian to clients that
expect positive network-endian, preferably mentioned in RFC...  BTW, that case
is not impossible - posix_lock_file() can return -ENOLCK and we do not handle
that one explicitly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:28 -08:00
Al Viro de1ae286f8 [PATCH] NFSERR_SERVERFAULT returned host-endian
->rp_status is network-endian and nobody byteswaps it before sending to
client; putting NFSERR_SERVERFAULT instead of nfserr_serverfault in there is
not nice...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:28 -08:00
Al Viro 9246585a11 [PATCH] nfsd4_truncate() bogus return value
-EINVAL (in host order, no less) is not a good thing to return to client.

nfsd4_truncate() returns it in one case and its callers expect nfs_....  from
it.  AFAICS, it should be nfserr_inval

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:27 -08:00
Al Viro d75f2b9f5d [PATCH] nfsd/vfs.c: endianness fixes
Several failure exits return -E<something> instead of nfserr_<something> and
vice versa.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:27 -08:00
Fred Isaman 5274881992 [PATCH] nfsd4: clean up settattr code
Clean up some unnecessary special-casing in the setattr code..

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:27 -08:00
Fred Isaman 34081efc12 [PATCH] nfsd4: Fix bug in rdattr_error return
Fix bug in rdattr_error return which causes correct error code to be
overwritten by nfserr_toosmall.

Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:27 -08:00
J. Bruce Fields 6c26d08f02 [PATCH] nfsd4: fix open_downgrade
Bad bookkeeping of the share reservations when handling open upgrades was
causing open downgrade to fail.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:27 -08:00
J. Bruce Fields fb553c0f17 [PATCH] nfsd4: don't create on open that fails due to ERR_GRACE
In an earlier patch (commit b648330a1d) I noted
that a too-early grace-period check was preventing us from bumping the
sequence id on open.  Unfortunately in that patch I stupidly moved the
grace-period check back too far, so now an open for create can succesfully
create the file while still returning ERR_GRACE.

The correct place for that check is after we've set the open_owner and handled
any replays, but before we actually start mucking with the filesystem.

Thanks to Avishay Traeger for reporting the bug.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields 0f442aa299 [PATCH] nfsd4: simplify process-open1 logic
nfsd4_process_open1 is very highly nested; flatten it out a bit.

Also, the preceding comment, which just outlines the logic, seems redundant.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields 375c5547cb [PATCH] nfsd4: nfs4state.c miscellaneous goto removals
Remove some goto's that made the logic here a little more tortuous than
necessary.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields ae8b625313 [PATCH] nfsd4: no replays on unconfirmed owners
We shouldn't check for replays until after checking whether the open owner is
confirmed.  Clients are allowed to reuse openowners without bumping the seqid.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields a525825df1 [PATCH] nfsd4: handle replays of failed open reclaims
We need to make sure open reclaims are marked confirmed immediately so that we
can handle replays even if they fail (e.g.  with a seqid-incrementing error).
(See 8.1.8.)

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields c2642ab05b [PATCH] nfsd4: recovery lookup dir check
Make sure we get a directory when we look up the recovery directory.

Thanks to Christoph Hellwig for the bug report.

Based on feedback from Christoph and others, we may remove the need for this
lookup and just pass in a file descriptor from userspace instead, and/or
completely move the directory handling to userspace.  For now we're just
fixing the obvious bugs.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields d22749b62f [PATCH] nfsd4: fix open of recovery directory
We should be opening this directory RDONLY, not RDWR.

Thanks to Christoph Hellwig for the bug report.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:26 -08:00
J. Bruce Fields fd44527707 [PATCH] nfsd4: operation debugging
Simple, useful debugging printk: print the number of each op as we process it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:25 -08:00
J. Bruce Fields 796dadfd02 [PATCH] nfsd4: fix check_for_locks
Fix some bad logic.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:25 -08:00
J. Bruce Fields 04ef595484 [PATCH] nfsd4: remove release_state_owner()
It's confusing having both release_stateowner() and release_state_owner().

And as it turns out, release_state_owner() is short and only called from one
place; so just remove it.

Also note the confirmed check is superfluous there--preprocess_seqid_op
already check this.

And remove a redundant comment and a superfluous line assignment while we're
at it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:25 -08:00
J. Bruce Fields 3a65588adc [PATCH] nfsd4: rename lk_stateowner
One of the things that's confusing about nfsd4_lock is that the lk_stateowner
field could be set to either of two different lockowners: the open owner or
the lock owner.  Rename to lk_replay_owner and add a comment to make it clear
that it's used for whichever stateowner has its sequence id bumped for replay
detection.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:24 -08:00
J. Bruce Fields 8a28051085 [PATCH] nfsd4: fix nfsd4_lock cleanup on failure
release_state_owner also puts the lock owner on the close_lru.  There's no
need for that, though; replays of the failed lock would be handled by the
openowner not the lockowner.

Also consolidate the cleanup a bit, fixing leaks that can happen if errors
occur between the time a new lock owner is allocated and the lock is done.

Remove a comment and dprintk that look a little redundant.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:24 -08:00
Andy Adamson a6f6ef2f1d [PATCH] nfsd4: misc lock fixes
Logic fixes for LOCK and UNLOCK.

- Move the permission check on the current file handle outside of
  nfs4_lock_state()

- remove the file manager fl_release_private calls; fl_ops is not set.

Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:24 -08:00
NeilBrown 7e8f05934d [PATCH] nfsd: remove inline from a couple of large NFS functions
These are both called from two places close together.  I could rearrange that
code so there is only one call site, but just removing the 'inline' is
probably best.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:24 -08:00
YAMAMOTO Takashi f193fbab2e [PATCH] nfsd: check error status from nfsd_sync_dir
Change nfsd_sync_dir to return an error if ->sync fails, and pass that error
up through the stack.  This involves a number of rearrangements of error
paths, and care to distinguish between Linux -errno numbers and NFSERR
numbers.

In the 'create' routines, we continue with the 'setattr' even if a previous
sync_dir failed.

This patch is quite different from Takashi's in a few ways, but there is still
a strong lineage.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:24 -08:00
Roman Zippel 6b192832da [PATCH] hfs: set type/creator for symlinks
Set the correct type and creator for symlinks.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:23 -08:00
Roman Zippel af8c85bb6d [PATCH] hfs: set correct create date for links
HFS+ also requires the correct creation date so recent version of OS X
recognize it as link.
Improve link handling:
- if something is wrong with the link, ignore the link attribute and treat
  it as regular file (this also fixes a missing unlock during lookup).
- check for incorrect link counts during unlink.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:23 -08:00
Roman Zippel 9a4cad95c9 [PATCH] hfs: set correct ctime
Read the correct ctime from disk (it was written but never read for some
reason).  Read also creation date, which is used in the next patch.  (Problem
found by Olivier Castan <olivier.castan@certa.ssi.gouv.fr>)

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:23 -08:00
David Elliott 2179d372d9 [PATCH] hfs: add HFSX support
Add support for HFSX, which allows for case-sensitive filenames.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:23 -08:00
Roman Zippel 7cf3cc3036 [PATCH] hfs: cleanup HFS prints
Add the log level and a "hfs: " prefix to all kernel prints.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:23 -08:00
Roman Zippel 634725a929 [PATCH] hfs: cleanup HFS+ prints
Add the log level and a "hfs: " prefix to all kernel prints.  (HFS and HFS+
will use the same prefix, as they share some code and could be merged at some
point.)

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:22 -08:00
Arnd Bergmann 5131cf154a [PATCH] add missing syscall declarations
All standard system calls should be declared in include/linux/syscalls.h.

Add some of the new additions that were previously missed.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:22 -08:00
Eric Van Hensbergen 147b31cf09 [PATCH] v9fs: add readpage support
v9fs mmap support was originally removed from v9fs at Al Viro's request,
but recently there have been requests from folks who want readpage
functionality (primarily to enable execution of files mounted via 9P).
This patch adds readpage support (but not writepage which contained most of
the objectionable code).  It passes fsx-linux (and other regressions) so it
should be relatively safe.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:22 -08:00
Jan Kara 43c3e6f5ab [PATCH] jbd: remove_transaction fix
We have to check that also the second checkpoint list is non-empty before
dropping the transaction.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:16 -08:00
Jan Kara 8d3c7fce2d [PATCH] jbd: log_do_checkpoint fix
While checkpointing we have to check that our transaction still is in the
checkpoint list *and* (not or) that it's not just a different transaction
with the same address.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:16 -08:00
Steve French 47c886b312 [CIFS] Fix oops in cifs_readpages caused by not checking buf_type in an
error path of new cifs_readpages code.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-18 14:20:39 -08:00
Steve French d65177c1ae Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-17 19:49:59 -08:00
Steve French d41f084a74 [CIFS] Remove compiler warning
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-17 19:16:53 -08:00
David Chinner d88992f660 [XFS] Fix a race in xfs_submit_ioend() where we can be completing I/O for
a page while we are still submitting other buffers on the same page for
I/O.

SGI-PV: 948197
SGI-Modid: xfs-linux-melb:xfs-kern:25004a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-18 13:38:12 +11:00
Miklos Szeredi 095da6cbb6 [PATCH] fuse: fix bitfield race
Fix race in setting bitfields of fuse_conn.  Spotted by Andrew Morton.

The two fields ->connected and ->mounted were always changed with the
fuse_lock held.  But other bitfields in the same structure were changed
without the lock.  In theory this could lead to losing the assignment of
even the ones under lock.  The chosen solution is to change these two
fields to be a full unsigned type.  The other bitfields aren't "important"
enough to warrant the extra complexity of full locking or changing them to
bitops.

For all bitfields document why they are safe wrt. concurrent
assignments.

Also make the initialization of the 'num_waiting' atomic counter explicit.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
Miklos Szeredi c1aa96a52e [PATCH] fuse: use asynchronous READ requests for readpages
This patch changes fuse_readpages() to send READ requests asynchronously.

This makes it possible for userspace filesystems to utilize the kernel
readahead logic instead of having to implement their own (resulting in double
caching).

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
Miklos Szeredi 361b1eb55e [PATCH] fuse: READ request initialization
Add a separate function for filling in the READ request.  This will make it
possible to send asynchronous READ requests as well as synchronous ones.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
Miklos Szeredi 9b9a04693f [PATCH] fuse: move INIT handling to inode.c
Now the INIT requests can be completely handled in inode.c and the
fuse_send_init() function need not be global any more.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
Miklos Szeredi 64c6d8ed4c [PATCH] fuse: add asynchronous request support
Add possibility for requests to run asynchronously and call an 'end' callback
when finished.

With this, the special handling of the INIT and RELEASE requests can be
cleaned up too.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:31 -08:00
Miklos Szeredi 69a53bf267 [PATCH] fuse: add connection aborting
Add ability to abort a filesystem connection.

With the introduction of asynchronous reads, the ability to interrupt any
request is not enough to dissolve deadlocks, since now waiting for the request
completion (page unlocked) is independent of the actual request, so in a
deadlock all threads will be uninterruptible.

The solution is to make it possible to abort all requests, even those
currently undergoing I/O to/from userspace.  The natural interface for this is
'mount -f mountpoint', but that only works as long as the filesystem is
attached.  So also add an 'abort' attribute to the sysfs view of the
connection.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi 0cd5b88553 [PATCH] fuse: add number of waiting requests attribute
This patch adds the 'waiting' attribute which indicates how many filesystem
requests are currently waiting to be completed.  A non-zero value without any
filesystem activity indicates a hung or deadlocked filesystem.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi f543f253f3 [PATCH] fuse: make fuse connection a kobject
Kobjectify fuse_conn, and make it visible under /sys/fs/fuse/connections.

Lacking any natural naming, connections are numbered.

This patch doesn't add any attributes, just the infrastructure.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi 9ba7cbba10 [PATCH] fuse: extend semantics of connected flag
The ->connected flag for a fuse_conn object previously only indicated whether
the device file for this connection is currently open or not.

Change it's meaning so that it indicates whether the connection is active or
not: now either umount or device release will clear the flag.

The separate ->mounted flag is still needed for handling background requests.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi d77a1d5b61 [PATCH] fuse: introduce list for requests under I/O
Create a new list for requests in the process of being transfered to/from
userspace.  This will be needed to be able to abort all requests even those
currently under I/O

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi 83cfd49351 [PATCH] fuse: introduce unified request state
The state of request was made up of 2 bitfields (->sent and ->finished) and of
the fact that the request was on a list or not.

Unify this into a single state field.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi 6383bdaa2e [PATCH] fuse: miscellaneous cleanup
- remove some unneeded assignments

 - use kzalloc instead of kmalloc + memset

 - simplify setting sb->s_fs_info

 - in fuse_send_init() use fuse_get_request() instead of
   do_get_request() helper

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:30 -08:00
Miklos Szeredi 8bfc016d2e [PATCH] fuse: uninline some functions
Inline keyword is unnecessary in most cases.  Clean them up.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Miklos Szeredi b3bebd94bb [PATCH] fuse: handle error INIT reply
Handle the case when the INIT request is answered with an error.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Miklos Szeredi f43b155a5a [PATCH] fuse: fix request_end()
This function used the request object after decrementing its reference count
and releasing the lock.  This could in theory lead to all sorts of problems.

Fix and simplify at the same time.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Miklos Szeredi 222f1d6918 [PATCH] fuse: fuse_copy_finish() order fix
fuse_copy_finish() must be called before request_end(), since the later might
sleep, and no sleeping is allowed between fuse_copy_one() and
fuse_copy_finish() because of kmap_atomic()/kunmap_atomic() used in them.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Miklos Szeredi f87fd4c2a0 [PATCH] add /sys/fs
This patch adds an empty /sys/fs, which filesystems can use.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Bob Copeland 0e6e1db4ac [PATCH] partitions: Read Rio Karma partition table
The Rio Karma portable MP3 player has its own proprietary partition table.

The partition layout is similar to a DOS boot sector but it begins at a
different offset and uses a different magic number (0xAB56 instead of
0xAA55).  Add support for it to enable mounting the device.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-16 23:15:29 -08:00
Nathan Scott 01ffe339e3 Make alloc_page_buffers() initialise buffer_heads using init_buffer(),
like other routines here, to ensure buffers are correctly initialised
with respect to b_private/b_end_io.  Fixes an odd interaction between
XFS and reiserfs.

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-17 09:02:07 +11:00
Linus Torvalds 4a8e4a270b Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2006-01-15 22:18:04 -08:00
Nathan Scott 107a09c44b [XFS] remove no-longer-needed IS_NOATIME macro, twas just a build workaround
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 16:28:07 +11:00
Nathan Scott c2e8143220 [XFS] mutex fallout - fix debug builds and remove no-longer-useful comment.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 16:21:34 +11:00
Nathan Scott 54245702ab [XFS] Fix symlink creation too, with respect to initialising SELinux
context.

SGI-PV: 946762
SGI-Modid: xfs-linux-melb:xfs-kern:24983a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-16 15:54:05 +11:00
Linus Torvalds 3f02d072d4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-15 16:43:29 -08:00
Arjan van de Ven f16623569e [PATCH] Mark some key VFS functions as __always_inline
Mark a few VFS functions as mandatory inline (based on Al Viro's request);
these must be inline due to stack usage issues during a recursive loop that
happens during the recursive symlink resolution (symlink to a symlink to a
symlink ..)

This patch at this point does not change behavior and is for documentation
purposes only (but this changes later in the series)

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: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:15 -08:00
Pekka Enberg d063389ecf [PATCH] smbfs: remove kmalloc wrapper
Remove the remaining kmalloc() wrapper bits from fs/smbfs/.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:13 -08:00
Pekka Enberg 44db77f33c [PATCH] ncpfs: remove kmalloc wrapper
Remove remaining kmalloc wrapper bits from fs/ncpfs/.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:12 -08:00
Valdis.Kletnieks@vt.edu 3135806358 [PATCH] quota: make useless quota error message informative
fs/quota_v2.c can, under some conditions, issue a kernel message that says,
in totality, 'failed read'.  This patch does the following:

1) Gives a hint who issued the error message, so people reading the logs
   don't have to go grepping the entire kernel tree (with 11 false
   positives).

2) Say what amount of data we expected, and actually got.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:12 -08:00
Pekka Enberg d9975d6ba0 [PATCH] reiserfs: remove d_splice_alias NULL check from reiserfs_lookup
Remove redundant NULL check in reiserfs_lookup() as d_splice_alias() can take
NULL inode as input.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:12 -08:00
Pekka Enberg 2ff6b1c257 [PATCH] isofs: remove d_splice_alias NULL check from isofs_lookup
Remove redundant NULL check in isofs_lookup() as d_splice_alias() can take
NULL inode as input.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:12 -08:00
Pekka Enberg ba7fe36987 [PATCH] ext3: remove d_splice_alias NULL check from ext3_lookup
Remove redundant NULL check in ext3_lookup() as d_splice_alias() can take NULL
inode as input.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:10 -08:00
Pekka Enberg 082a05c6f0 [PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup
Remove redundant NULL check in ext2_lookup() as d_splice_alias() can take NULL
inode as input.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:10 -08:00
Robin Holt 7339ff8302 [PATCH] Add tmpfs options for memory placement policies
Anything that writes into a tmpfs filesystem is liable to disproportionately
decrease the available memory on a particular node.  Since there's no telling
what sort of application (e.g.  dd/cp/cat) might be dropping large files
there, this lets the admin choose the appropriate default behavior for their
site's situation.

Introduce a tmpfs mount option which allows specifying a memory policy and
a second option to specify the nodelist for that policy.  With the default
policy, tmpfs will behave as it does today.  This patch adds support for
preferred, bind, and interleave policies.

The default policy will cause pages to be added to tmpfs files on the node
which is doing the writing.  Some jobs expect a single process to create
and manage the tmpfs files.  This results in a node which has a
significantly reduced number of free pages.

With this patch, the administrator can specify the policy and nodes for
that policy where they would prefer allocations.

This patch was originally written by Brent Casavant and Hugh Dickins.  I
added support for the bind and preferred policies and the mpol_nodelist
mount option.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:27:07 -08:00
Arjan van de Ven 858119e159 [PATCH] Unlinline a bunch of other functions
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>
2006-01-14 18:27:06 -08:00
Neil Horman 7170be5f58 [PATCH] convert /proc/devices to use seq_file interface
A Christoph suggested that the /proc/devices file be converted to use the
seq_file interface.  This patch does that.

I've obxerved one or two installation that had sufficiently large sans that
they overran the 4k limit on /proc/devices.

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:25:19 -08:00
Ian Kent faf3a98918 [PATCH] autofs4 oops fix
We forgot to initialise a couple of nameidata fields.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:25:19 -08:00
Christian Kujau 624dffcbcf correct email address of Manfred Spraul
I  tried to send the forcedeth maintainer an email, but it came back with:

"The mail address manfreds@colorfullife.com is not read anymore.
Please resent your mail to manfred@ instead of manfreds@."

This patch fixes this.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15 02:43:54 +01:00
Jesper Juhl 014c2544e6 return statement cleanup - kill pointless parentheses
This patch removes pointless parentheses from return statements.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15 02:37:08 +01:00
Evgeniy 7b4ee73e28 [PATCH] ufs cleanup
Here is update of ufs cleanup patch, brought on by the recently fixed
ubh_get_usb_second() bug that made some ugly code rather painfully
obvious.  It also includes

 - fix compilation warnings which appears if debug mode turn on
 - remove unnecessary duplication of code to support UFS2

I tested it on ufs1 and ufs2 file-systems.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 10:27:32 -08:00
Steve French eeac8047fc [CIFS] Fix CIFS to recognize share mode security
Fix Samba bugzilla bug 3301

In share mode encrypted password must be sent on tree connection (in our
case only the NTLM password is sent, not the older LANMAN one).

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-13 21:34:58 -08:00
Paul Mackerras 25cd6aa0aa Merge ../linux-2.6 2006-01-14 09:15:28 +11:00
Evgeniy 8a430d74fe [PATCH] Fix oops in ufs_fill_super at mount time
There's a lack of parenthesis in fs/ufs/utils.h, so instead of the 512th
byte of buffer, the usb2 pointer will point to the nth structure of type
ufs_super_block_second.

This can cause a mount-time oops if you're unlucky (especially with
DEBUG_PAGEALLOC, which is how Alexey Dobriyan saw this problem)

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-13 08:42:48 -08:00
Dave C Boutcher 898b5395e9 [PATCH] powerpc: Add/remove/update properties in /proc/device-tree
Add support to the proc_device_tree file for removing
and updating properties.  Remove just removes the
proc file, update changes the data pointer within
the proc file.  The remainder of the device-tree
changes occur elsewhere.

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-13 21:02:13 +11:00
Steve French 84153973a2 [CIFS] Fix typo
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12 20:57:56 -08:00
Steve French 0a4b92c05e [CIFS] Add worker function for Get ACL cifs style
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12 15:44:21 -08:00
Steve French 94bc2be31a Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12 14:47:08 -08:00
Steve French c32a0b689c [CIFS] Allow local filesize for file that is open for write to be updated
from server when mount forcedirectio.

Allowing update of file size with non forcedirectio mounts should be
allowed in the fiture but requires carefully writing out the
last page in the local file if it is a partial page in order to
avoid corruption and careful serialization

Thanks to Maximiliano Curia who suggested similar changes and provided
a testcase.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12 14:41:28 -08:00
Linus Torvalds 9f5974c873 Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2006-01-12 09:10:34 -08:00
Andi Kleen c6b44d10f2 [PATCH] Implement ioctl emulation for the parport character device
Fixes bugzilla.kernel.org bug 2903.

Cc: <tim@cyberelk.net>
Cc: <andrea@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:08:49 -08:00
Andi Kleen 2966387b48 [PATCH] x86_64: Implement compat code for sg driver SG_GET_REQUEST_TABLE ioctl
Apparently helps with some non SANE scanner drivers.

Cc: axboe@suse.de

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 19:04:53 -08:00
Randy Dunlap 16f7e0fe2e [PATCH] capable/capability.h (fs/)
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>
2006-01-11 18:42:13 -08:00
Randy.Dunlap c59ede7b78 [PATCH] move capable() to capability.h
- Move capable() from sched.h to capability.h;

- Use <linux/capability.h> where capable() is used
	(in include/, block/, ipc/, kernel/, a few drivers/,
	mm/, security/, & sound/;
	many more drivers/ to go)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:13 -08:00
Jan Kara ef43bc4fc3 [PATCH] reiserfs: fix assertion failure in reiserfs+journaled quotas
Sometimes we call do_journal_end() with t_refcount == 0.  If quota is
turned on and we happen to have some inode with preallocation bad things
happen as we try to use the current handle for quota operations.  Checks
for t_refcount in journal_begin() fail and we Oops.  We raise t_refcount to
make those checks happy.  We should not cause any bad as all the needed
quota blocks should be already attached to the transaction (they were
attached to the transaction when we allocated those preallocation blocks).

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:12 -08:00
Vivek Goyal 9e9e3941d0 [PATCH] kdump: vmcore compilation warning fix
o fs/proc/vmcore.c compilation gives warnings on ppc64. The reason being
  that u64 is defined as unsigned long hence u64* is not same as loff_t*
  and compiler cribs.

o Changed the parameter type to u64* instead of loff_t* to resolve the
  conflict.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-11 18:42:11 -08:00
Nathan Scott ddae9c2ea7 Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git 2006-01-12 13:34:47 +11:00
Nathan Scott 0d1335b310 [XFS] Fix follow_link when dealing with symlinks larger than 256 bytes.
Thanks to Yamamoto Takashi.

SGI-PV: 947953
SGI-Modid: xfs-linux-melb:xfs-kern:24962a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:32:51 +11:00
Nathan Scott 3762ec6bf7 [XFS] Merge in trivial changes, sync up headers with userspace
equivalents.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24961a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-12 10:29:53 +11:00
Nathan Scott 6ab65429b4 [XFS] Fix compiler warnings from older gcc versions wrt printfalike
arguments.

SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:24901a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-01-11 21:03:28 +11:00