sfrench/cifs-2.6.git
13 years agoget rid of home-grown mutex in cris eeprom.c
Al Viro [Fri, 21 May 2010 15:19:18 +0000 (11:19 -0400)]
get rid of home-grown mutex in cris eeprom.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch ecryptfs_write() to struct inode *, kill on-stack fake files
Al Viro [Fri, 21 May 2010 15:09:58 +0000 (11:09 -0400)]
switch ecryptfs_write() to struct inode *, kill on-stack fake files

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch ecryptfs_get_locked_page() to struct inode *
Al Viro [Fri, 21 May 2010 15:02:14 +0000 (11:02 -0400)]
switch ecryptfs_get_locked_page() to struct inode *

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosimplify access to ecryptfs inodes in ->readpage() and friends
Al Viro [Fri, 21 May 2010 14:56:12 +0000 (10:56 -0400)]
simplify access to ecryptfs inodes in ->readpage() and friends

we can get to them from page->mapping->host, no need to mess with
file.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoAFS: Don't put struct file on the stack
Al Viro [Fri, 21 May 2010 14:27:09 +0000 (15:27 +0100)]
AFS: Don't put struct file on the stack

Don't put struct file on the stack as it takes up quite a lot of space
and violates lifetime rules for struct file.

Rather than calling afs_readpage() indirectly from the directory routines by
way of read_mapping_page(), split afs_readpage() to have afs_page_filler()
that's given a key instead of a file and call read_cache_page(), specifying the
new function directly.  Use it in afs_readpages() as well.

Also make use of this in afs_mntpt_check_symlink() too for the same reason.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
13 years agoBan ecryptfs over ecryptfs
Al Viro [Mon, 17 May 2010 04:59:46 +0000 (00:59 -0400)]
Ban ecryptfs over ecryptfs

This is a seriously simplified patch from Eric Sandeen; copy of
rationale follows:
===
  mounting stacked ecryptfs on ecryptfs has been shown to lead to bugs
  in testing.  For crypto info in xattr, there is no mechanism for handling
  this at all, and for normal file headers, we run into other trouble:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  IP: [<ffffffffa015b0b3>] ecryptfs_d_revalidate+0x43/0xa0 [ecryptfs]
  ...

  There doesn't seem to be any good usecase for this, so I'd suggest just
  disallowing the configuration.

  Based on a patch originally, I believe, from Mike Halcrow.
===

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs: replace inode uid,gid,mode initialization with helper function
Al Viro [Sat, 15 May 2010 08:02:54 +0000 (04:02 -0400)]
logfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoufs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:23 +0000 (17:32 +0300)]
ufs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoudf: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:22 +0000 (17:32 +0300)]
udf: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoubifs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:21 +0000 (17:32 +0300)]
ubifs: replace inode uid,gid,mode initialization with helper function

Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosysv: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:20 +0000 (17:32 +0300)]
sysv: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoreiserfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:19 +0000 (17:32 +0300)]
reiserfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoramfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:18 +0000 (17:32 +0300)]
ramfs: replace inode uid,gid,mode initialization with helper function

- seems what ramfs_get_inode is only locally, make it static.
[AV: the hell it is; it's used by shmem, so shmem needed conversion too
and no, that function can't be made static]

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoomfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:17 +0000 (17:32 +0300)]
omfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:46 +0000 (17:31 +0300)]
bfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoocfs2: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:16 +0000 (17:32 +0300)]
ocfs2: replace inode uid,gid,mode initialization with helper function

Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonilfs2: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:15 +0000 (17:32 +0300)]
nilfs2: replace inode uid,gid,mode initialization with helper function

Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agominix: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:14 +0000 (17:32 +0300)]
minix: replace inode uid,gid,mode init with helper

- also redesign minix_new_inode interface

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext4: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:51 +0000 (17:31 +0300)]
ext4: replace inode uid,gid,mode init with helper

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext3: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:50 +0000 (17:31 +0300)]
ext3: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext2: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:49 +0000 (17:31 +0300)]
ext2: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoexofs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:48 +0000 (17:31 +0300)]
exofs: replace inode uid,gid,mode initialization with helper function

Ack-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobtrfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:47 +0000 (17:31 +0300)]
btrfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agojfs: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:30:58 +0000 (17:30 +0300)]
jfs: replace inode uid,gid,mode init with helper

Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years ago9p: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:30:57 +0000 (17:30 +0300)]
9p: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: Add inode uid,gid,mode init helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:29:14 +0000 (17:29 +0300)]
vfs: Add inode uid,gid,mode init helper

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs-writeback.c: bitfields should be unsigned
H Hartley Sweeten [Fri, 2 Apr 2010 01:36:30 +0000 (20:36 -0500)]
fs-writeback.c: bitfields should be unsigned

This fixes sparse noise:
  error: dubious one-bit signed bitfield

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonamei.c : update mnt when it needed
Huang Shijie [Fri, 2 Apr 2010 09:37:13 +0000 (17:37 +0800)]
namei.c : update mnt when it needed

update the mnt of the path when it is not equal to the new one.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: add lockdep annotation to s_vfs_rename_key for ecryptfs
Roland Dreier [Tue, 27 Apr 2010 21:23:57 +0000 (14:23 -0700)]
vfs: add lockdep annotation to s_vfs_rename_key for ecryptfs

 >  =============================================
 >  [ INFO: possible recursive locking detected ]
 >  2.6.31-2-generic #14~rbd3
 >  ---------------------------------------------
 >  firefox-3.5/4162 is trying to acquire lock:
 >   (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >
 >  but task is already holding lock:
 >   (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >
 >  other info that might help us debug this:
 >  3 locks held by firefox-3.5/4162:
 >   #0:  (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >   #1:  (&sb->s_type->i_mutex_key#11/1){+.+.+.}, at: [<ffffffff81139d5a>] lock_rename+0x6a/0xf0
 >   #2:  (&sb->s_type->i_mutex_key#11/2){+.+.+.}, at: [<ffffffff81139d6f>] lock_rename+0x7f/0xf0
 >
 >  stack backtrace:
 >  Pid: 4162, comm: firefox-3.5 Tainted: G         C 2.6.31-2-generic #14~rbd3
 >  Call Trace:
 >   [<ffffffff8108ae74>] print_deadlock_bug+0xf4/0x100
 >   [<ffffffff8108ce26>] validate_chain+0x4c6/0x750
 >   [<ffffffff8108d2e7>] __lock_acquire+0x237/0x430
 >   [<ffffffff8108d585>] lock_acquire+0xa5/0x150
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff815526ad>] __mutex_lock_common+0x4d/0x3d0
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff8120eaf9>] ? ecryptfs_rename+0x99/0x170
 >   [<ffffffff81552b36>] mutex_lock_nested+0x46/0x60
 >   [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >   [<ffffffff8120eb2a>] ecryptfs_rename+0xca/0x170
 >   [<ffffffff81139a9e>] vfs_rename_dir+0x13e/0x160
 >   [<ffffffff8113ac7e>] vfs_rename+0xee/0x290
 >   [<ffffffff8113c212>] ? __lookup_hash+0x102/0x160
 >   [<ffffffff8113d512>] sys_renameat+0x252/0x280
 >   [<ffffffff81133eb4>] ? cp_new_stat+0xe4/0x100
 >   [<ffffffff8101316a>] ? sysret_check+0x2e/0x69
 >   [<ffffffff8108c34d>] ? trace_hardirqs_on_caller+0x14d/0x190
 >   [<ffffffff8113d55b>] sys_rename+0x1b/0x20
 >   [<ffffffff81013132>] system_call_fastpath+0x16/0x1b

The trace above is totally reproducible by doing a cross-directory
rename on an ecryptfs directory.

The issue seems to be that sys_renameat() does lock_rename() then calls
into the filesystem; if the filesystem is ecryptfs, then
ecryptfs_rename() again does lock_rename() on the lower filesystem, and
lockdep can't tell that the two s_vfs_rename_mutexes are different.  It
seems an annotation like the following is sufficient to fix this (it
does get rid of the lockdep trace in my simple tests); however I would
like to make sure I'm not misunderstanding the locking, hence the CC
list...

Signed-off-by: Roland Dreier <rdreier@cisco.com>
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs/partitions: use ADDPART_FLAG_RAID instead of magic number
Cesar Eduardo Barros [Sat, 17 Apr 2010 22:28:09 +0000 (19:28 -0300)]
fs/partitions: use ADDPART_FLAG_RAID instead of magic number

ADDPART_FLAG_RAID was introduced in commit d18d768, and most places were
converted to use it instead of a hardcoded value. However, some places seem
to have been missed.

Change all of them to the symbolic names via the following semantic patch:

@@
struct parsed_partitions *state;
expression E;
@@
(
- state->parts[E].flags = 1
+ state->parts[E].flags = ADDPART_FLAG_RAID
|
- state->parts[E].flags |= 1
+ state->parts[E].flags |= ADDPART_FLAG_RAID
|
- state->parts[E].flags = 2
+ state->parts[E].flags = ADDPART_FLAG_WHOLEDISK
|
- state->parts[E].flags |= 2
+ state->parts[E].flags |= ADDPART_FLAG_WHOLEDISK
)

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosanitize vfs_fsync calling conventions
Christoph Hellwig [Mon, 22 Mar 2010 16:32:25 +0000 (17:32 +0100)]
sanitize vfs_fsync calling conventions

Now that the last user passing a NULL file pointer is gone we can remove
the redundant dentry argument and associated hacks inside vfs_fsynmc_range.

The next step will be removig the dentry argument from ->fsync, but given
the luck with the last round of method prototype changes I'd rather
defer this until after the main merge window.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonfsd: open a file descriptor for fsync in nfs4 recovery
Christoph Hellwig [Mon, 22 Mar 2010 16:32:14 +0000 (17:32 +0100)]
nfsd: open a file descriptor for fsync in nfs4 recovery

Instead of just looking up a path use do_filp_open to get us a file
structure for the nfs4 recovery directory.  This allows us to get
rid of the last non-standard vfs_fsync caller with a NULL file
pointer.

[AV: should be using fput(), not filp_close()]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: inode.c use atomic_inc_return in __iget
Richard Kennedy [Fri, 14 May 2010 09:49:22 +0000 (10:49 +0100)]
fs: inode.c use atomic_inc_return in __iget

Using atomic_inc_return in __iget(struct inode *inode) makes the intent
of this code clearer and generates less code on processors that have
this operation.

On x86_64 this patch reduces the text size of inode.o by 12 bytes.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
----
patch against 2.6.34-rc7
compiled & tested on x86_64 AMD X2

I've been running with this patch applied for several weeks with no
obvious problems.
regards
Richard
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoanon_inode: set S_IFREG on the anon_inode
Eric Paris [Fri, 14 May 2010 15:44:10 +0000 (11:44 -0400)]
anon_inode: set S_IFREG on the anon_inode

anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR;  This means
that (inode->i_mode & S_IFMT) == 0.  This trips up some SELinux code that
needs to determine if a given inode is a regular file, a directory, etc.
The easiest solution is to just make sure that the anon_inode also sets
S_IFREG.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agogfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:23 +0000 (17:53 -0700)]
gfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoocfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:22 +0000 (17:53 -0700)]
ocfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agojffs2: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:21 +0000 (17:53 -0700)]
jffs2: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoxfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:20 +0000 (17:53 -0700)]
xfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoreiserfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:19 +0000 (17:53 -0700)]
reiserfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext4: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:18 +0000 (17:53 -0700)]
ext4: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext3: constify xattr handlers
Stephen Hemminger [Fri, 14 May 2010 00:53:17 +0000 (17:53 -0700)]
ext3: constify xattr handlers

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext2: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:16 +0000 (17:53 -0700)]
ext2: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobtrfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:15 +0000 (17:53 -0700)]
btrfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: xattr_handler table should be const
Stephen Hemminger [Fri, 14 May 2010 00:53:14 +0000 (17:53 -0700)]
fs: xattr_handler table should be const

The entries in xattr handler table should be immutable (ie const)
like other operation tables.

Later patches convert common filesystems. Uncoverted filesystems
will still work, but will generate a compiler warning.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoIntroduce freeze_super and thaw_super for the fsfreeze ioctl
Josef Bacik [Tue, 23 Mar 2010 14:34:56 +0000 (10:34 -0400)]
Introduce freeze_super and thaw_super for the fsfreeze ioctl

Currently the way we do freezing is by passing sb>s_bdev to freeze_bdev and then
letting it do all the work.  But freezing is more of an fs thing, and doesn't
really have much to do with the bdev at all, all the work gets done with the
super.  In btrfs we do not populate s_bdev, since we can have multiple bdev's
for one fs and setting s_bdev makes removing devices from a pool kind of tricky.
This means that freezing a btrfs filesystem fails, which causes us to corrupt
with things like tux-on-ice which use the fsfreeze mechanism.  So instead of
populating sb->s_bdev with a random bdev in our pool, I've broken the actual fs
freezing stuff into freeze_super and thaw_super.  These just take the
super_block that we're freezing and does the appropriate work.  It's basically
just copy and pasted from freeze_bdev.  I've then converted freeze_bdev over to
use the new super helpers.  I've tested this with ext4 and btrfs and verified
everything continues to work the same as before.

The only new gotcha is multiple calls to the fsfreeze ioctl will return EBUSY if
the fs is already frozen.  I thought this was a better solution than adding a
freeze counter to the super_block, but if everybody hates this idea I'm open to
suggestions.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoTrim includes in fs/super.c
Al Viro [Tue, 23 Mar 2010 17:56:07 +0000 (13:56 -0400)]
Trim includes in fs/super.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoMove grabbing s_umount to callers of grab_super()
Al Viro [Tue, 23 Mar 2010 15:11:05 +0000 (11:11 -0400)]
Move grabbing s_umount to callers of grab_super()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoTake statfs variants to fs/statfs.c
Al Viro [Tue, 23 Mar 2010 14:37:36 +0000 (10:37 -0400)]
Take statfs variants to fs/statfs.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch selinux delayed superblock handling to iterate_supers()
Al Viro [Tue, 23 Mar 2010 10:36:54 +0000 (06:36 -0400)]
switch selinux delayed superblock handling to iterate_supers()

... kill their private list, while we are at it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonew helper: iterate_supers()
Al Viro [Tue, 23 Mar 2010 10:06:58 +0000 (06:06 -0400)]
new helper: iterate_supers()

... and switch the simple "loop over superblocks and do something"
loops to it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoBury __put_super_and_need_restart()
Al Viro [Tue, 23 Mar 2010 01:13:53 +0000 (21:13 -0400)]
Bury __put_super_and_need_restart()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix prune_dcache()/umount() race
Al Viro [Tue, 23 Mar 2010 00:27:55 +0000 (20:27 -0400)]
fix prune_dcache()/umount() race

... and get rid of the last __put_super_and_need_restart() caller

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoIn get_super() and user_get_super() restarts are unconditional
Al Viro [Tue, 23 Mar 2010 00:23:25 +0000 (20:23 -0400)]
In get_super() and user_get_super() restarts are unconditional

If superblock had been still alive, we would've returned it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix get_active_super()/umount() race
Al Viro [Tue, 23 Mar 2010 00:15:33 +0000 (20:15 -0400)]
fix get_active_super()/umount() race

This one needs restarts...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix do_emergency_remount()/umount() races
Al Viro [Tue, 23 Mar 2010 00:11:53 +0000 (20:11 -0400)]
fix do_emergency_remount()/umount() races

need list_for_each_entry_safe() here.  Original didn't even
have restart logics, so if you race with umount() it blew up.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoConvert simple loops over superblocks to list_for_each_entry_safe
Al Viro [Tue, 23 Mar 2010 00:09:33 +0000 (20:09 -0400)]
Convert simple loops over superblocks to list_for_each_entry_safe

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of restarts in sync_filesystems()
Al Viro [Mon, 22 Mar 2010 23:56:42 +0000 (19:56 -0400)]
get rid of restarts in sync_filesystems()

At the same time we can kill s_need_restart and local mutex in there.
__put_super() made public for a while; will be gone later.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoLeave superblocks on s_list until the end
Al Viro [Mon, 22 Mar 2010 23:36:35 +0000 (19:36 -0400)]
Leave superblocks on s_list until the end

We used to remove from s_list and s_instances at the same
time.  So let's *not* do the former and skip superblocks
that have empty s_instances in the loops over s_list.

The next step, of course, will be to get rid of rescan logics
in those loops.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoSaner locking around deactivate_super()
Al Viro [Mon, 22 Mar 2010 19:22:31 +0000 (15:22 -0400)]
Saner locking around deactivate_super()

Make sure that s_umount is acquired *before* we drop the final
active reference; we still have the fast path (atomic_dec_unless)
and we have gotten rid of the window between the moment when
s_active hits zero and s_umount is acquired.  Which simplifies
the living hell out of grab_super() and inotify pin_to_kill()
stuff.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of S_BIAS
Al Viro [Mon, 22 Mar 2010 12:53:19 +0000 (08:53 -0400)]
get rid of S_BIAS

use atomic_inc_not_zero(&sb->s_active) instead of playing games with
checking ->s_count > S_BIAS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of open-coded grab_super() in get_active_super()
Al Viro [Mon, 22 Mar 2010 02:34:11 +0000 (22:34 -0400)]
get rid of open-coded grab_super() in get_active_super()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosb_entry() has been killed a couple of years ago and resurrected on mismerge
Al Viro [Sun, 21 Mar 2010 23:24:23 +0000 (19:24 -0400)]
sb_entry() has been killed a couple of years ago and resurrected on mismerge

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoceph: should use deactivate_locked_super() on failure exits
Al Viro [Sun, 21 Mar 2010 23:22:29 +0000 (19:22 -0400)]
ceph: should use deactivate_locked_super() on failure exits

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoClean ecryptfs ->get_sb() up
Al Viro [Sun, 21 Mar 2010 16:24:29 +0000 (12:24 -0400)]
Clean ecryptfs ->get_sb() up

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix a couple of ecryptfs leaks
Al Viro [Sun, 21 Mar 2010 02:32:26 +0000 (22:32 -0400)]
fix a couple of ecryptfs leaks

First of all, get_sb_nodev() grabs anon dev minor and we
never free it in ecryptfs ->kill_sb().  Moreover, on one
of the failure exits in ecryptfs_get_sb() we leak things -
it happens before we set ->s_root and ->put_super() won't
be called in that case.  Solution: kill ->put_super(), do
all that stuff in ->kill_sb().  And use kill_anon_sb() instead
of generic_shutdown_super() to deal with anon dev leak.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoSimplify devpts_get_sb() failure exits
Al Viro [Sun, 21 Mar 2010 01:57:43 +0000 (21:57 -0400)]
Simplify devpts_get_sb() failure exits

postpone simple_set_mnt() until we know we won't fail.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoremove incorrect comment in do_emergency_remount
Christoph Hellwig [Mon, 1 Feb 2010 20:55:52 +0000 (21:55 +0100)]
remove incorrect comment in do_emergency_remount

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoclean DCACHE_CANT_MOUNT in d_delete()
Al Viro [Fri, 21 May 2010 20:11:04 +0000 (16:11 -0400)]
clean DCACHE_CANT_MOUNT in d_delete()

We set the "it's dead, don't mount on it" flag _and_ do not remove it if
we turn the damn thing negative and leave it around.  And if it goes
positive afterwards, well...

Fortunately, there's only one place where that needs to be caught:
only d_delete() can turn the sucker negative without immediately freeing
it; all other places that can lead to ->d_iput() call are followed by
unconditionally freeing struct dentry in question.  So the fix is obvious:

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16014
Reported-by: Adam Tkac <vonsch@gmail.com>
Tested-by: Adam Tkac <vonsch@gmail.com>
Cc: <stable@kernel.org> [2.6.34.x]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 21 May 2010 22:26:46 +0000 (15:26 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (577 commits)
  Staging: ramzswap: Handler for swap slot free callback
  swap: Add swap slot free callback to block_device_operations
  swap: Add flag to identify block swap devices
  Staging: vt6655: use ETH_FRAME_LEN macro instead of custom one
  Staging: vt6655: use ETH_DATA_LEN macro instead of custom one
  Staging: vt6655: use ETH_FCS_LEN macro instead of custom one
  Staging: vt6656: use ETH_HLEN macro instead of custom one
  Staging: comedi: quatech_daqp_cs.c Replace eos semaphore with a completion.
  Staging: dt3155v4l: remove private memory allocator
  Staging: crystalhd: Remove typedefs from driver
  Staging: winbond: Fix for pointer name format issue in mds.c
  Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs
  Staging: vt6656: removed custom CHAR/SHORT/INT/LONG typedefs
  Staging: comedi: Altered the way printk is used in 8255.c
  staging: iio: adis16350 and similar IMU driver
  Staging: iio: max1363 Fix two bugs in single_channel_from_ring
  Staging: iio: adis16220 extract bin_attribute structures from state
  Staging: iio: adis16220 vibration sensor driver
  Staging: comedi: Kconfig dependancy fixes
  Staging: comedi: fix up build error from last Kconfig changes
  ...

13 years agoMerge branch 'for-2.6.35' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 21 May 2010 22:25:33 +0000 (15:25 -0700)]
Merge branch 'for-2.6.35' of git://git.kernel.dk/linux-2.6-block

* 'for-2.6.35' of git://git.kernel.dk/linux-2.6-block: (86 commits)
  pipe: set lower and upper limit on max pages in the pipe page array
  pipe: add support for shrinking and growing pipes
  drbd: This is now equivalent to drbd release 8.3.8rc1
  drbd: Do not free p_uuid early, this is done in the exit code of the receiver
  drbd: Null pointer deref fix to the large "multi bio rewrite"
  drbd: Fix: Do not detach, if a bio with a barrier fails
  drbd: Ensure to not trigger late-new-UUID creation multiple times
  drbd: Do not Oops when C_STANDALONE when uuid gets generated
  writeback: fix mixed up arguments to bdi_start_writeback()
  writeback: fix problem with !CONFIG_BLOCK compilation
  block: improve automatic native capacity unlocking
  block: use struct parsed_partitions *state universally in partition check code
  block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity()
  block: restart partition scan after resizing a device
  buffer: make invalidate_bdev() drain all percpu LRU add caches
  block: remove all rcu head initializations
  writeback: fixups for !dirty_writeback_centisecs
  writeback: bdi_writeback_task() must set task state before calling schedule()
  writeback: ensure that WB_SYNC_NONE writeback with sb pinned is sync
  drivers/block/drbd: Use kzalloc
  ...

13 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 21 May 2010 22:23:54 +0000 (15:23 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (25 commits)
  MIPS: Use GCC __builtin_prefetch() to implement prefetch().
  MIPS: Octeon: Serial port fixes for OCTEON simulator.
  MIPS: Octeon: Get rid of early serial.
  MIPS: AR7: prevent race between clock initialization and devices registration
  MIPS: AR7: use ar7_has_high_vlynq() to determine watchdog base address
  MIPS: BCM63xx: Avoid namespace clash on GPIO_DIR_{IN,OUT}
  MIPS: MTX-1: Update defconfig
  MIPS: BCM47xx: Update defconfig
  MIPS: RB532: Update defconfig
  MIPS: AR7: Update defconfig
  RTC: rtc-cmos: Fix binary mode support
  MIPS: Oprofile: Loongson: Cleanup the comments
  MIPS: Oprofile: Loongson: Cleanup of the macros
  MIPS: Oprofile: Loongson: Remove unused variable from loongson2_cpu_setup()
  MIPS: Oprofile: Loongson: Remove useless parentheses
  MIPS: Oprofile: Loongson: Unify macro for setting events
  MIPS: nofpu and nodsp only affect CPU0
  MIPS: Clean up tables for bootmem allocation
  MIPS: Coding style cleanups of access of FCSR rounding mode bits
  MIPS: Loongson 2F: Add gpio/gpioilb support
  ...

13 years agosysctl: fix kernel-doc notation and typos
Randy Dunlap [Fri, 21 May 2010 18:29:53 +0000 (11:29 -0700)]
sysctl: fix kernel-doc notation and typos

Fix kernel-doc warnings, kernel-doc special characters, and
typos in recent kernel/sysctl.c additions.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Fri, 21 May 2010 22:20:57 +0000 (15:20 -0700)]
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux

* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: (23 commits)
  OMAP: DSS2: Fix omap_dss_probe() error path
  OMAP: DSS2: omap_dss_probe() conditional compilation cleanup
  board-omap3-beagle: add DSS2 support
  OMAP2: DSS: Add missing line for update bg color
  OMAP3630: DSS2: Updating MAX divider value
  OMAP: RX51: Update board defconfig
  OMAP: DSS2: Add ACX565AKM Panel Driver
  OMAP: RX51: Add Touch Controller in SPI board info
  OMAP: RX51: Add LCD Panel support
  OMAP: DSS2: TPO-TD03MTEA1: fix Kconfig dependency
  OMAP: LCD LS037V7DW01: Add Backlight driver support
  OMAP: DSS2: Taal: Fix DSI bus locking problem
  OMAP: DSS2: Taal: add mutex to protect panel data
  OMAP: DSS2: Make partial update width even
  OMAP: DSS2: Fix device disable when driver is not loaded
  OMAP: DSS2: VENC: don't call platform_enable/disable() twice
  OMAP: DSS2: check lock_fb_info() return value
  OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking order
  OMAP: DSS2: Use vdds_sdi regulator supply in SDI
  OMAP: DSS2: Remove redundant enable/disable calls from SDI
  ...

13 years agoceph: avoid resending queued message to monitor
Sage Weil [Fri, 21 May 2010 19:31:49 +0000 (12:31 -0700)]
ceph: avoid resending queued message to monitor

The auth_reply handler will (re)send any pending requests.  For the
initial mon authenticate phase, that's correct, but when a auth ticket
renewal races with an in-flight request, we may resend a request message
that is already in flight.  Avoid this by revoking the message before
sending it.

We should also avoid resending requests at all during ticket renewal; that
will come soon.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoceph: Storage class should be before const qualifier
Tobias Klauser [Thu, 20 May 2010 08:40:19 +0000 (10:40 +0200)]
ceph: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 21 May 2010 21:46:51 +0000 (14:46 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (46 commits)
  random: simplify fips mode
  crypto: authenc - Fix cryptlen calculation
  crypto: talitos - add support for sha224
  crypto: talitos - add hash algorithms
  crypto: talitos - second prepare step for adding ahash algorithms
  crypto: talitos - prepare for adding ahash algorithms
  crypto: n2 - Add Niagara2 crypto driver
  crypto: skcipher - Add ablkcipher_walk interfaces
  crypto: testmgr - Add testing for async hashing and update/final
  crypto: tcrypt - Add speed tests for async hashing
  crypto: scatterwalk - Fix scatterwalk_done() test
  crypto: hifn_795x - Rename ablkcipher_walk to hifn_cipher_walk
  padata: Use get_online_cpus/put_online_cpus in padata_free
  padata: Add some code comments
  padata: Flush the padata queues actively
  padata: Use a timer to handle remaining objects in the reorder queues
  crypto: shash - Remove usage of CRYPTO_MINALIGN
  crypto: mv_cesa - Use resource_size
  crypto: omap - OMAP macros corrected
  padata: Use get_online_cpus/put_online_cpus
  ...

Fix up conflicts in arch/arm/mach-omap2/devices.c

13 years ago9p: add 9P2000.L rename operation
Sripathi Kodi [Thu, 25 Mar 2010 12:47:26 +0000 (12:47 +0000)]
9p: add 9P2000.L rename operation

I made a V2 of this patch on top of my patches for VFS switches.
All the changes were due to change in some offsets.

rename - change name of file or directory

size[4] Trename tag[2] fid[4] newdirfid[4] name[s]
size[4] Rrename tag[2]

The rename message is used to change the name of a file, possibly moving it
to a new directory.  The 9P wstat message can only rename a file within the
same directory.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: add 9P2000.L statfs operation
Sripathi Kodi [Thu, 25 Mar 2010 12:45:30 +0000 (12:45 +0000)]
9p: add 9P2000.L statfs operation

I made a V2 of this patch on top of my patches for VFS switches. The
change was adding v9fs_statfs pointer to v9fs_super_ops_dotl
instead of v9fs_super_ops.

statfs - get file system statistics

size[4] Tstatfs tag[2] fid[4]
size[4] Rstatfs tag[2] type[4] bsize[4] blocks[8] bfree[8] bavail[8]
                files[8] ffree[8] fsid[8] namelen[4]

The statfs message is used to request file system information returned
by the statfs(2) system call, which is used by df(1) to report file
system and disk space usage.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: VFS switches for 9p2000.L: VFS switches
Sripathi Kodi [Thu, 25 Mar 2010 12:41:54 +0000 (12:41 +0000)]
9p: VFS switches for 9p2000.L: VFS switches

Implements VFS switches for 9p2000.L protocol.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: VFS switches for 9p2000.L: protocol and client changes
Sripathi Kodi [Thu, 25 Mar 2010 12:40:35 +0000 (12:40 +0000)]
9p: VFS switches for 9p2000.L: protocol and client changes

Prepare p9pdu_read/write functions to handle multiple protocols.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agoPCI: hotplug: pciehp: Removed check for hotplug of display devices
Praveen Kalamegham [Wed, 19 May 2010 22:03:12 +0000 (17:03 -0500)]
PCI: hotplug: pciehp: Removed check for hotplug of display devices

Removed check to prevent hotplug of display devices within pciehp.
Originally this was thought to have been required within the PCI
Hotplug specification for some legacy devices.  However there is
no such requirement in the most recent revision. The check prevents
hotplug of not only display devices but also computational GPUs
which require serviceability.

Signed-off-by: Praveen Kalamegham <praveen@nextio.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI: read memory ranges out of Broadcom CNB20LE host bridge
Ira W. Snyder [Thu, 1 Apr 2010 18:43:30 +0000 (11:43 -0700)]
PCI: read memory ranges out of Broadcom CNB20LE host bridge

Read the memory ranges behind the Broadcom CNB20LE host bridge out of the
hardware. This allows PCI hotplugging to work, since we know which memory
range to allocate PCI BAR's from.

The x86 PCI code automatically prefers the ACPI _CRS information when it is
available. In that case, this information is not used.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoPCI: Allow manual resource allocation for PCI hotplug bridges
Felix Radensky [Sun, 28 Mar 2010 13:02:02 +0000 (16:02 +0300)]
PCI: Allow manual resource allocation for PCI hotplug bridges

At the moment only PCI-E briges can be flagged as hotplug, thus
allowing manual resource preallocation via pci=hpmemsize=nnM and
pci=hpiosize=nnM kernel parameters. Some PCI hotplug bridges, e.g.
PLX 6254 can also benefit from this functionalily, as kernel fails
to properly allocate their resources when hotplug device is added
and PCI bus is rescanned.

This patch adds header quirk for PLX 6254 that marks this bridge
as hotplug. Other PCI bridges with similar problems can use it
as well.

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoMerge branch 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
Linus Torvalds [Fri, 21 May 2010 21:40:30 +0000 (14:40 -0700)]
Merge branch 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm

* 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
  drivers: video: msm: add include msm_mdp.h
  drivers: video: msm: default to no

13 years agoMerge branch 'msm-mmc_sdcc' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
Linus Torvalds [Fri, 21 May 2010 21:38:35 +0000 (14:38 -0700)]
Merge branch 'msm-mmc_sdcc' of git://codeaurora.org/quic/kernel/dwalker/linux-msm

* 'msm-mmc_sdcc' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
  drivers: mmc: msm_sdcc: Add EMBEDDED_SDIO support
  mmc: msm_sdcc: Fix issue where clocks could be disabled mid transaction
  mmc: msm_sdcc: Fix the dma exec function to use the proper delays
  mmc: msm_sdcc: Don't set host->curr.mrq until after we're sure the busclk timer won't fire
  mmc: msm_sdcc: Enable busclk idle timer for power savings
  mmc: msm_sdcc: Don't disable interrupts while suspending
  mmc: msm_sdcc: Fix issue where we might not end a sucessfull request
  mmc: msm_sdcc: Featurize busclock power save and disable it by default
  mmc: msm_sdcc: Fix bug where busclk expiry timer was not properly disabled
  mmc: msm_sdcc: Reduce command timeouts and improve reliability.
  mmc: msm_sdcc: Schedule clock disable after probe
  mmc: msm_sdcc: Wrap readl/writel calls with appropriate clk delays
  mmc: msm_sdcc: Driver clocking/irq improvements
  msm: Add 'execute' datamover callback
  mmc: msm_sdcc: Snoop SDIO_CCCR_ABORT register
  mmc: msm_sdcc: Clean up clock management and add a 10us delay after enabling clocks

13 years agoMIPS: Use GCC __builtin_prefetch() to implement prefetch().
David Daney [Fri, 14 May 2010 19:44:18 +0000 (12:44 -0700)]
MIPS: Use GCC __builtin_prefetch() to implement prefetch().

GCC's __builtin_prefetch() was introduced a long time ago, all
supported GCC versions have it.  Lets do what the big boys up in
linux/prefetch.h do, except we use '1' as the third parameter to
provoke 'PREF 0,...'  and 'PREF 1,...' instead of other prefetch
hints.

This allows for better code generation.  In theory the existing
embedded asm could be optimized, but the compiler has these builtins,
so there is really no point.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1235/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Serial port fixes for OCTEON simulator.
David Daney [Wed, 19 May 2010 21:16:32 +0000 (14:16 -0700)]
MIPS: Octeon: Serial port fixes for OCTEON simulator.

For the simulator, fake a slow clock to get fast output.

In prom_putchar we have to mask the value so the simulator doesn't
ASSERT when printing non-ASCII characters.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1255/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Get rid of early serial.
David Daney [Wed, 19 May 2010 21:16:31 +0000 (14:16 -0700)]
MIPS: Octeon: Get rid of early serial.

Get rid of early_serial_setup, we use CONFIG_EARLY_PRINTK instead.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1254/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: AR7: prevent race between clock initialization and devices registration
Florian Fainelli [Tue, 11 May 2010 09:20:14 +0000 (11:20 +0200)]
MIPS: AR7: prevent race between clock initialization and devices registration

ar7_regiser_devices needs ar7_clocks_init to have been called first,
however clock.o is currently linked later due to its order in the Makefile,
therefore ar7_clocks_init always gets called later than ar7_register_devices
because both have the same initcall level. Fix this by moving
ar7_register_devices to the right initcall level.

Reported-by: Michael J. Evans <mjevans1983@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1212/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: AR7: use ar7_has_high_vlynq() to determine watchdog base address
Florian Fainelli [Tue, 11 May 2010 09:20:09 +0000 (11:20 +0200)]
MIPS: AR7: use ar7_has_high_vlynq() to determine watchdog base address

Instead of doing yet another switch/case on the chip_id, use existing
inline function to set the watchdog base address.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1211/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: BCM63xx: Avoid namespace clash on GPIO_DIR_{IN,OUT}
Florian Fainelli [Tue, 4 May 2010 08:38:57 +0000 (10:38 +0200)]
MIPS: BCM63xx: Avoid namespace clash on GPIO_DIR_{IN,OUT}

This is too generic a name, so prefix it with BCM63XX_ to avoid potential
namespace clashes when including <asm/gpio.h>.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
To:     linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1171/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: MTX-1: Update defconfig
Florian Fainelli [Sun, 2 May 2010 09:39:11 +0000 (11:39 +0200)]
MIPS: MTX-1: Update defconfig

Updates the 4G Systems MTX-1 defconfig, and remove systems unavailable
on this platform.  Changes include:

- built-in MTD char/block support
- GPIO sysfs support
- MTX-1 watchdog driver
- I2C over GPIO driver as a module
- SquashFS support

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1168/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: BCM47xx: Update defconfig
Florian Fainelli [Sun, 2 May 2010 09:39:07 +0000 (11:39 +0200)]
MIPS: BCM47xx: Update defconfig

Update Broadcom BCM47xx defconfig with:

- tiny RCU
- BCM47xx watchdog driver
- b43/b43legacy wireless as modules
- SSB Gigabit Ethernet driver
- disabled IRDA

6igned-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1167/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: RB532: Update defconfig
Florian Fainelli [Sun, 2 May 2010 09:39:02 +0000 (11:39 +0200)]
MIPS: RB532: Update defconfig

This updates the Mikrotik RB532 defconfig with:

- tiny RCU
- RB532 input buttons driver
- RB532 LED driver
- RC32434 watchdog driver
- GPIO sysfs support
- Wireless support
- SquashFS support
- more LED triggers

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1166/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: AR7: Update defconfig
Florian Fainelli [Sun, 2 May 2010 09:38:57 +0000 (11:38 +0200)]
MIPS: AR7: Update defconfig

Update Texas Instruments AR7 defconfig with:

- tiny RCU
- LEDs GPIO
- disable SSB
- enable zboot support
- enable GPIO sysfs support

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1165/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoRTC: rtc-cmos: Fix binary mode support
Arnaud Patard [Thu, 29 Apr 2010 09:58:44 +0000 (11:58 +0200)]
RTC: rtc-cmos: Fix binary mode support

As a follow-up to the thread about RTC support for some Loongson 2E/2F
boards, this patch tries to address the "REVISIT"/"FIXME" comments about
rtc binary mode handling and allow rtc to work with rtc in binary mode.
I've also raised the message about 24-h mode not supported to warning
otherwise, one may end up with no rtc without any message in the kernel
log.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
To: linux-mips@linux-mips.org
To: rtc-linux@googlegroups.com
Cc: david-b@pacbell.net
Cc: a.zummo@towertech.it
Cc: akpm@linux-foundation.org
Patchwork: http://patchwork.linux-mips.org/patch/1158/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Oprofile: Loongson: Cleanup the comments
Wu Zhangjin [Thu, 6 May 2010 17:29:48 +0000 (01:29 +0800)]
MIPS: Oprofile: Loongson: Cleanup the comments

Removes some out-of-date comments and empty lines.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1204/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Oprofile: Loongson: Cleanup of the macros
Wu Zhangjin [Thu, 6 May 2010 17:29:47 +0000 (01:29 +0800)]
MIPS: Oprofile: Loongson: Cleanup of the macros

The _EXL, _KERNEL etc. bits are in the performance control register so
use _PERFCTRL prefix instead of _PERFCNT.  While at it make the macro
more readable, use _ENABLE instead of _INT_EN suffix to describe the
interrupt enable bit.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1203/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Oprofile: Loongson: Remove unused variable from loongson2_cpu_setup()
Wu Zhangjin [Thu, 6 May 2010 17:29:46 +0000 (01:29 +0800)]
MIPS: Oprofile: Loongson: Remove unused variable from loongson2_cpu_setup()

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1202/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Oprofile: Loongson: Remove useless parentheses
Wu Zhangjin [Thu, 6 May 2010 17:29:45 +0000 (01:29 +0800)]
MIPS: Oprofile: Loongson: Remove useless parentheses

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1201/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>