]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoproc: move /proc/stat to fs/proc/stat.c
Alexey Dobriyan [Sat, 4 Oct 2008 20:01:56 +0000 (00:01 +0400)]
proc: move /proc/stat to fs/proc/stat.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move rest of /proc/partitions code to block/genhd.c
Alexey Dobriyan [Sat, 4 Oct 2008 19:53:21 +0000 (23:53 +0400)]
proc: move rest of /proc/partitions code to block/genhd.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoproc: move /proc/cpuinfo code to fs/proc/cpuinfo.c
Alexey Dobriyan [Sat, 4 Oct 2008 19:40:23 +0000 (23:40 +0400)]
proc: move /proc/cpuinfo code to fs/proc/cpuinfo.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/devices code to fs/proc/devices.c
Alexey Dobriyan [Sat, 4 Oct 2008 19:11:37 +0000 (23:11 +0400)]
proc: move /proc/devices code to fs/proc/devices.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move rest of /proc/locks to fs/locks.c
Alexey Dobriyan [Sat, 4 Oct 2008 18:34:18 +0000 (22:34 +0400)]
proc: move rest of /proc/locks to fs/locks.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/kmsg creation to fs/proc/kmsg.c
Alexey Dobriyan [Sat, 4 Oct 2008 10:39:12 +0000 (14:39 +0400)]
proc: move /proc/kmsg creation to fs/proc/kmsg.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: remove remnants of ->read_proc in proc_misc.c
Alexey Dobriyan [Sat, 4 Oct 2008 10:30:53 +0000 (14:30 +0400)]
proc: remove remnants of ->read_proc in proc_misc.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/execdomains to kernel/exec_domain.c
Alexey Dobriyan [Sat, 4 Oct 2008 10:28:09 +0000 (14:28 +0400)]
proc: move /proc/execdomains to kernel/exec_domain.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: switch /proc/cmdline to seq_file
Alexey Dobriyan [Sat, 4 Oct 2008 10:13:59 +0000 (14:13 +0400)]
proc: switch /proc/cmdline to seq_file

and move it to fs/proc/cmdline.c while I'm at it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/filesystems to fs/filesystems.c
Alexey Dobriyan [Sat, 4 Oct 2008 10:08:37 +0000 (14:08 +0400)]
proc: move /proc/filesystems to fs/filesystems.c

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/stram to m68k-specific code
Alexey Dobriyan [Sat, 4 Oct 2008 09:49:34 +0000 (13:49 +0400)]
proc: move /proc/stram to m68k-specific code

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: move /proc/hardware to m68k-specific code
Alexey Dobriyan [Fri, 3 Oct 2008 18:42:36 +0000 (22:42 +0400)]
proc: move /proc/hardware to m68k-specific code

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: switch /proc/version to seq_file
Alexey Dobriyan [Fri, 3 Oct 2008 07:53:19 +0000 (11:53 +0400)]
proc: switch /proc/version to seq_file

and move it to fs/proc/version.c while I'm at it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: switch /proc/meminfo to seq_file
Alexey Dobriyan [Wed, 15 Oct 2008 19:50:22 +0000 (23:50 +0400)]
proc: switch /proc/meminfo to seq_file

and move it to fs/proc/meminfo.c while I'm at it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: switch /proc/uptime to seq_file
Alexey Dobriyan [Thu, 2 Oct 2008 22:38:18 +0000 (02:38 +0400)]
proc: switch /proc/uptime to seq_file

and move it to fs/proc/uptime.c while I'm at it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: switch /proc/loadavg to seq_file
Alexey Dobriyan [Thu, 2 Oct 2008 22:21:47 +0000 (02:21 +0400)]
proc: switch /proc/loadavg to seq_file

and move it to fs/proc/loadavg.c while I'm at it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: use WARN() rather than printk+backtrace
Arjan van de Ven [Sun, 14 Sep 2008 02:51:30 +0000 (19:51 -0700)]
proc: use WARN() rather than printk+backtrace

Use WARN() rather than a printk() + backtrace();
this gives a more standard format message as well as complete
information (including line numbers etc) that will be collected
by kerneloops.org

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: spread __init
Alexey Dobriyan [Fri, 17 Oct 2008 01:07:44 +0000 (05:07 +0400)]
proc: spread __init

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: proc_init_inodecache() can't fail
Alexey Dobriyan [Thu, 16 Oct 2008 23:43:55 +0000 (03:43 +0400)]
proc: proc_init_inodecache() can't fail

kmem_cache creation code will panic, don't return anything.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years agoproc: fix vma display mismatch between /proc/pid/{maps,smaps}
Joe Korty [Thu, 16 Oct 2008 11:27:09 +0000 (15:27 +0400)]
proc: fix vma display mismatch between /proc/pid/{maps,smaps}

Commit 4752c369789250eafcd7813e11c8fb689235b0d2 aka
"maps4: simplify interdependence of maps and smaps" broke /proc/pid/smaps,
causing it to display some vmas twice and other vmas not at all.  For example:

    grep .- /proc/1/smaps >/tmp/smaps; diff /proc/1/maps /tmp/smaps

    1  25d24
    2  < 7fd7e23aa000-7fd7e23ac000 rw-p 7fd7e23aa000 00:00 0
    3  28a28
    4  > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0  [vsyscall]

The bug has something to do with setting m->version before all the
seq_printf's have been performed.  show_map was doing this correctly,
but show_smap was doing this in the middle of its seq_printf sequence.
This patch arranges things so that the setting of m->version in show_smap
is also done at the end of its seq_printf sequence.

Testing: in addition to the above grep test, for each process I summed
up the 'Rss' fields of /proc/pid/smaps and compared that to the 'VmRSS'
field of /proc/pid/status.  All matched except for Xorg (which has a
/dev/mem mapping which Rss accounts for but VmRSS does not).  This result
gives us some confidence that neither /proc/pid/maps nor /proc/pid/smaps
are any longer skipping or double-counting vmas.

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years ago[PATCH] fs: add a sanity check in d_free
Arjan van de Ven [Tue, 21 Oct 2008 13:47:33 +0000 (06:47 -0700)]
[PATCH] fs: add a sanity check in d_free

Hi Al,

remember that debug session we did at KS? You suggested this patch back
then....

From 7751eaf30474b8cbfaea64795805a17eab05ac53 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Tue, 16 Sep 2008 16:51:17 -0700
Subject: [PATCH] fs: add a sanity check in d_free

we're seeing some corruption in the dentry->d_alias list that
appears like a free of an entry still on the list; this patch
adds a WARN_ON() to catch this scenario, as suggested by Al Viro

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
15 years ago[PATCH] i_version: remount support
Mimi Zohar [Mon, 13 Oct 2008 04:09:50 +0000 (00:09 -0400)]
[PATCH] i_version: remount support

Add support for remounting a filesystem with the i_version option.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
15 years ago[patch] vfs: make security_inode_setattr() calling consistent
Miklos Szeredi [Wed, 30 Jul 2008 12:06:22 +0000 (14:06 +0200)]
[patch] vfs: make security_inode_setattr() calling consistent

Call security_inode_setattr() consistetly before inode_change_ok().
It doesn't make sense to try to "optimize" the i_op->setattr == NULL
case, as most filesystem do define their own setattr function.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years ago[patch 1/3] FS_MBCACHE: don't needlessly make it built-in
Adrian Bunk [Wed, 20 Aug 2008 23:56:22 +0000 (16:56 -0700)]
[patch 1/3] FS_MBCACHE: don't needlessly make it built-in

Assume you have:
- one or more of ext2/3/4 statically built into your kernel
- none of these with extended attributes enabled and
- want to add onother one of ext2/3/4 modular and with
  extended attributes enabled

then you currently have to reboot to use it since this results in
CONFIG_FS_MBCACHE=y.

That's not a common issue, but I just ran into it and since there's no
reason to get a built-in mbcache in this case this patch fixes it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Andreas Gruenbacher <agruen@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[PATCH] move executable checking into ->permission()
Miklos Szeredi [Thu, 31 Jul 2008 11:41:58 +0000 (13:41 +0200)]
[PATCH] move executable checking into ->permission()

For execute permission on a regular files we need to check if file has
any execute bits at all, regardless of capabilites.

This check is normally performed by generic_permission() but was also
added to the case when the filesystem defines its own ->permission()
method.  In the latter case the filesystem should be responsible for
performing this check.

Move the check from inode_permission() inside filesystems which are
not calling generic_permission().

Create a helper function execute_ok() that returns true if the inode
is a directory or if any execute bits are present in i_mode.

Also fix up the following code:

 - coda control file is never executable
 - sysctl files are never executable
 - hfs_permission seems broken on MAY_EXEC, remove
 - hfsplus_permission is eqivalent to generic_permission(), remove

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years ago[PATCH] fs/dcache.c: update comment of d_validate()
Qinghuang Feng [Mon, 13 Oct 2008 10:32:42 +0000 (18:32 +0800)]
[PATCH] fs/dcache.c: update comment of d_validate()

Parameters @hash and @len have been removed since 2.4.3,
now just to delete them.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
15 years ago[RFC PATCH] touch_mnt_namespace when the mount flags change
Dan Williams [Sat, 27 Sep 2008 02:01:20 +0000 (19:01 -0700)]
[RFC PATCH] touch_mnt_namespace when the mount flags change

Daemons that need to be launched while the rootfs is read-only can now
poll /proc/mounts to be notified when their O_RDWR requests may no
longer end in EROFS.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years ago[PATCH] reiserfs: add missing llseek method
Christoph Hellwig [Mon, 8 Sep 2008 17:42:50 +0000 (19:42 +0200)]
[PATCH] reiserfs: add missing llseek method

Reiserfs currently doesn't set a llseek method for regular files, which
means it will fall back to default_llseek.  This means no one can seek
beyond 2 Gigabytes on reiserfs, and that there's not protection vs
the i_size updates from writers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years ago[PATCH] fix ->llseek for more directories
Christoph Hellwig [Wed, 3 Sep 2008 19:53:01 +0000 (21:53 +0200)]
[PATCH] fix ->llseek for more directories

With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.

Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years ago[PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:29 +0000 (07:50 +0900)]
[PATCH vfs-2.6 6/6] vfs: add LOOKUP_RENAME_TARGET intent

This adds LOOKUP_RENAME_TARGET intent for lookup of rename destination.

LOOKUP_RENAME_TARGET is going to be used like LOOKUP_CREATE. But since
the destination of rename() can be existing directory entry, so it has a
difference. Although that difference doesn't matter in my usage, this
tells it to user of this intent.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:29 +0000 (07:50 +0900)]
[PATCH vfs-2.6 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup

lookup_hash() with LOOKUP_PARENT is bogus. And this prepares to add
new intent on those path.

The user of LOOKUP_PARENT intent is nfs only, and it checks whether
nd->flags has LOOKUP_CREATE or LOOKUP_OPEN, so the result is same.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate()
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:29 +0000 (07:50 +0900)]
[PATCH vfs-2.6 4/6] vfs: remove unnecessary fsnotify_d_instantiate()

This calls d_move(), so fsnotify_d_instantiate() is unnecessary like
rename path.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:28 +0000 (07:50 +0900)]
[PATCH vfs-2.6 3/6] vfs: add __d_instantiate() helper

This adds __d_instantiate() for users which is already taking
dcache_lock, and replace with it.

The part of d_add_ci() isn't equivalent. But it should be needed
fsnotify_d_instantiate() actually, because the path is to add the
inode to negative dentry.  fsnotify_d_instantiate() should be called
after change from negative to positive.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH vfs-2.6 2/6] vfs: add d_ancestor()
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:28 +0000 (07:50 +0900)]
[PATCH vfs-2.6 2/6] vfs: add d_ancestor()

This adds d_ancestor() instead of d_isparent(), then use it.

If new_dentry == old_dentry, is_subdir() returns 1, looks strange.
"new_dentry == old_dentry" is not subdir obviously. But I'm not
checking callers for now, so this keeps current behavior.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()
OGAWA Hirofumi [Wed, 15 Oct 2008 22:50:27 +0000 (07:50 +0900)]
[PATCH vfs-2.6 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
15 years ago[PATCH] get rid of on-stack dentry in udf
Al Viro [Sun, 12 Oct 2008 04:15:17 +0000 (00:15 -0400)]
[PATCH] get rid of on-stack dentry in udf

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH 2/2] anondev: switch to IDA
Alexey Dobriyan [Thu, 28 Aug 2008 02:26:23 +0000 (06:26 +0400)]
[PATCH 2/2] anondev: switch to IDA

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years ago[PATCH 1/2] anondev: init IDR statically
Alexey Dobriyan [Thu, 28 Aug 2008 02:25:49 +0000 (06:25 +0400)]
[PATCH 1/2] anondev: init IDR statically

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
15 years ago[JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()
David Woodhouse [Mon, 18 Aug 2008 14:36:47 +0000 (15:36 +0100)]
[JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup()

Now that JFFS2 can be exported by NFS, we need to get this right.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Optimise NFS readdir hack slightly.
David Woodhouse [Sun, 17 Aug 2008 16:21:18 +0000 (17:21 +0100)]
[PATCH] Optimise NFS readdir hack slightly.

Avoid calling the underlying ->readdir() again when we reached the end
already; keep going round the loop only if we stopped due to our own
buffer being full.

[AV: tidy the things up a bit, while we are there]

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] prepare vfs_readdir() callers to returning filldir result
Al Viro [Sun, 24 Aug 2008 11:29:52 +0000 (07:29 -0400)]
[PATCH] prepare vfs_readdir() callers to returning filldir result

It's not the final state, but it allows moving ->readdir() instances
to passing filldir return value to caller of vfs_readdir().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of on-stack dentry in ext2_get_parent()
Al Viro [Sun, 24 Aug 2008 11:28:39 +0000 (07:28 -0400)]
[PATCH] get rid of on-stack dentry in ext2_get_parent()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of on-stack fake dentry in ext3_get_parent()
Al Viro [Sun, 24 Aug 2008 11:26:48 +0000 (07:26 -0400)]
[PATCH] get rid of on-stack fake dentry in ext3_get_parent()

Better pass parent and qstr to ext3_find_entry() explicitly than
use such kludges, especially since the stack footprint is nasty
enough and we have every chance to be deep in call chain.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[JFFS2] Reinstate NFS exportability
David Woodhouse [Thu, 31 Jul 2008 19:39:25 +0000 (20:39 +0100)]
[JFFS2] Reinstate NFS exportability

Now that the readdir/lookup deadlock issues have been dealt with, we can
export JFFS2 file systems again.

(For now, you have to specify fsid manually; we should add a method to
the export_ops to handle that too.)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Remove XFS buffered readdir hack
David Woodhouse [Thu, 31 Jul 2008 19:38:04 +0000 (20:38 +0100)]
[PATCH] Remove XFS buffered readdir hack

Now that we've moved the readdir hack to the nfsd code, we can
remove the local version from the XFS code.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Copy XFS readdir hack into nfsd code.
David Woodhouse [Thu, 31 Jul 2008 19:29:12 +0000 (20:29 +0100)]
[PATCH] Copy XFS readdir hack into nfsd code.

Some file systems with their own internal locking have problems with the
way that nfsd calls the ->lookup() method from within a filldir function
called from their ->readdir() method. The recursion back into the file
system code can cause deadlock.

XFS has a fairly hackish solution to this which involves doing the
readdir() into a locally-allocated buffer, then going back through it
calling the filldir function afterwards. It's not ideal, but it works.

It's particularly suboptimal because XFS does this for local file
systems too, where it's completely unnecessary.

Copy this hack into the NFS code where it can be used only for NFS
export. In response to feedback, use it unconditionally rather than only
for the affected file systems.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Factor out nfsd_do_readdir() into its own function
David Woodhouse [Thu, 31 Jul 2008 16:16:51 +0000 (17:16 +0100)]
[PATCH] Factor out nfsd_do_readdir() into its own function

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] reduce the stack footprint of exportfs_decode_fh()
Al Viro [Mon, 11 Aug 2008 16:39:47 +0000 (12:39 -0400)]
[PATCH] reduce the stack footprint of exportfs_decode_fh()

no need to have _two_ 256-byte arrays on stack...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] kill d_alloc_anon
Christoph Hellwig [Mon, 11 Aug 2008 13:49:12 +0000 (15:49 +0200)]
[PATCH] kill d_alloc_anon

Remove d_alloc_anon now that no users are left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch all filesystems over to d_obtain_alias
Christoph Hellwig [Mon, 11 Aug 2008 13:49:04 +0000 (15:49 +0200)]
[PATCH] switch all filesystems over to d_obtain_alias

Switch all users of d_alloc_anon to d_obtain_alias.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] new helper: d_obtain_alias
Christoph Hellwig [Mon, 11 Aug 2008 13:48:57 +0000 (15:48 +0200)]
[PATCH] new helper: d_obtain_alias

The calling conventions of d_alloc_anon are rather unfortunate for all
users, and it's name is not very descriptive either.

Add d_obtain_alias as a new exported helper that drops the inode
reference in the failure case, too and allows to pass-through NULL
pointers and inodes to allow for tail-calls in the export operations.

Incidentally this helper already existed as a private function in
libfs.c as exportfs_d_alloc so kill that one and switch the callers
to d_obtain_alias.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] generic_file_llseek tidyups
Christoph Hellwig [Mon, 11 Aug 2008 13:37:17 +0000 (15:37 +0200)]
[PATCH] generic_file_llseek tidyups

Add kerneldoc for generic_file_llseek and generic_file_llseek_unlocked,
use sane variable names and unclutter the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] tidy up chrdev_open
Christoph Hellwig [Mon, 11 Aug 2008 13:34:22 +0000 (15:34 +0200)]
[PATCH] tidy up chrdev_open

Use a single goto label for chrdev_put + return error cases.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] hpfs: cleanup ->setattr
Christoph Hellwig [Sun, 10 Aug 2008 22:27:59 +0000 (00:27 +0200)]
[PATCH] hpfs: cleanup ->setattr

Reformat hpfs_notify_change to standard kernel style to make it readable
and rename it to hpfs_setattr as that's what the method is called.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] dm: kill lookup_device wrapper
Christoph Hellwig [Sun, 10 Aug 2008 22:24:08 +0000 (00:24 +0200)]
[PATCH] dm: kill lookup_device wrapper

Now that lookup_bdev is exported and used by dm just use it directly
instead of through a trivial wrapper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] make O_EXCL in nd->intent.flags visible in nd->flags
Al Viro [Tue, 5 Aug 2008 07:00:49 +0000 (03:00 -0400)]
[PATCH] make O_EXCL in nd->intent.flags visible in nd->flags

New flag: LOOKUP_EXCL.  Set before doing the final step of pathname
resolution on the paths that have LOOKUP_CREATE and O_EXCL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] don't pass bogus flags to LOOKUP_PARENT lookup in spufs
Al Viro [Sun, 3 Aug 2008 02:40:42 +0000 (22:40 -0400)]
[PATCH] don't pass bogus flags to LOOKUP_PARENT lookup in spufs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of path_lookup_create()
Al Viro [Sun, 3 Aug 2008 02:36:57 +0000 (22:36 -0400)]
[PATCH] get rid of path_lookup_create()

... and don't pass bogus flags when we are just looking for parent.
Fold __path_lookup_intent_open() into path_lookup_open() while we
are at it; that's the only remaining caller.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of nameidata in audit_tree
Al Viro [Sat, 2 Aug 2008 05:06:21 +0000 (01:06 -0400)]
[PATCH] get rid of nameidata in audit_tree

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] assorted path_lookup() -> kern_path() conversions
Al Viro [Sat, 2 Aug 2008 05:04:36 +0000 (01:04 -0400)]
[PATCH] assorted path_lookup() -> kern_path() conversions

more nameidata eviction

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch nfsd to kern_path()
Al Viro [Sat, 2 Aug 2008 05:03:36 +0000 (01:03 -0400)]
[PATCH] switch nfsd to kern_path()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] sanitize svc_export_parse()
Al Viro [Sat, 2 Aug 2008 05:01:02 +0000 (01:01 -0400)]
[PATCH] sanitize svc_export_parse()

clean up the exit paths, get rid of nameidata

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch quota_on-related stuff to kern_path()
Al Viro [Sat, 2 Aug 2008 04:57:06 +0000 (00:57 -0400)]
[PATCH] switch quota_on-related stuff to kern_path()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agodock: make dock driver not a module
Shaohua Li [Sat, 27 Sep 2008 03:10:28 +0000 (11:10 +0800)]
dock: make dock driver not a module

To avoid dock driver is loaded after other drivers like libata, let's
make dock driver not a module.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years ago[PATCH] no need for noinline stuff in fs/namespace.c anymore
Al Viro [Sat, 2 Aug 2008 04:55:27 +0000 (00:55 -0400)]
[PATCH] no need for noinline stuff in fs/namespace.c anymore

Stack footprint from hell had been due to many struct nameidata in there.
No more.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] finally get rid of nameidata in namespace.c
Al Viro [Sat, 2 Aug 2008 04:51:11 +0000 (00:51 -0400)]
[PATCH] finally get rid of nameidata in namespace.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] new helper - kern_path()
Al Viro [Sat, 2 Aug 2008 04:49:18 +0000 (00:49 -0400)]
[PATCH] new helper - kern_path()

Analog of lookup_path(), takes struct path *.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agox86: canonicalize remaining header guards
H. Peter Anvin [Thu, 23 Oct 2008 07:20:33 +0000 (00:20 -0700)]
x86: canonicalize remaining header guards

Canonicalize a few remaining header guards, with the exception for
those which are still in subarchitecture directories.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: drop double underscores from header guards
H. Peter Anvin [Thu, 23 Oct 2008 07:01:39 +0000 (00:01 -0700)]
x86: drop double underscores from header guards

Drop double underscores from header guards in arch/x86/include.  They
are used inconsistently, and are not necessary.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: Fix ASM_X86__ header guards
H. Peter Anvin [Thu, 23 Oct 2008 05:26:29 +0000 (22:26 -0700)]
x86: Fix ASM_X86__ header guards

Change header guards named "ASM_X86__*" to "_ASM_X86_*" since:

a. the double underscore is ugly and pointless.
b. no leading underscore violates namespace constraints.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml-config.h
Al Viro [Sat, 11 Oct 2008 22:39:18 +0000 (18:39 -0400)]
x86, um: get rid of uml-config.h

Take a few symbols we need into kern_constants.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of arch/um/Kconfig.arch
Al Viro [Mon, 25 Aug 2008 08:51:27 +0000 (04:51 -0400)]
x86, um: get rid of arch/um/Kconfig.arch

Teach scripts/kconfig/Makefile and top-level Makefile that arch/*/Makefile
is allowed to say Kconfig := <whatever I want instead of arch/blah/Kconfig>.
Rewrite arch/um/Kconfig and arch/um/Kconfig.<subarch> so that the latter
would be top-level one (and include the pieces of the former).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of arch/um/os symlink
Al Viro [Mon, 25 Aug 2008 08:14:29 +0000 (04:14 -0400)]
x86, um: get rid of arch/um/os symlink

we can get DEV_NULL defined for arch/um/drivers/null.c in less
convoluted ways, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of excessive includes of uml-config.h
Al Viro [Mon, 25 Aug 2008 08:12:10 +0000 (04:12 -0400)]
x86, um: get rid of excessive includes of uml-config.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of header symlinks
Al Viro [Sat, 23 Aug 2008 21:28:20 +0000 (17:28 -0400)]
x86, um: get rid of header symlinks

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: merge Kconfig.i386 and Kconfig.x86_64
Al Viro [Sat, 23 Aug 2008 21:00:34 +0000 (17:00 -0400)]
x86, um: merge Kconfig.i386 and Kconfig.x86_64

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of sysdep symlink
Al Viro [Tue, 19 Aug 2008 01:44:32 +0000 (21:44 -0400)]
x86, um: get rid of sysdep symlink

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: trim the junk from uml ptrace-*.h
Al Viro [Mon, 18 Aug 2008 21:47:45 +0000 (17:47 -0400)]
x86, um: trim the junk from uml ptrace-*.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: take vm-flags.h to sysdep
Al Viro [Mon, 18 Aug 2008 14:20:37 +0000 (10:20 -0400)]
x86, um: take vm-flags.h to sysdep

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml asm/arch
Al Viro [Mon, 18 Aug 2008 08:54:36 +0000 (04:54 -0400)]
x86, um: get rid of uml asm/arch

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml highmem.h
Al Viro [Mon, 18 Aug 2008 08:15:12 +0000 (04:15 -0400)]
x86, um: get rid of uml highmem.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml unistd.h
Al Viro [Mon, 18 Aug 2008 08:01:47 +0000 (04:01 -0400)]
x86, um: get rid of uml unistd.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of system.h -> system.h include
Al Viro [Mon, 18 Aug 2008 07:25:24 +0000 (03:25 -0400)]
x86, um: get rid of system.h -> system.h include

Long-term we want to split system.h and include barriers part from
underlying target; for now copy that part to sysdep.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: uml atomic.h is not needed anymore
Al Viro [Mon, 18 Aug 2008 05:36:36 +0000 (01:36 -0400)]
x86, um: uml atomic.h is not needed anymore

Its only difference from underlying atomic.h used to be the include
of kernel.h; it's not needed there anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: untangle uml ldt.h
Al Viro [Mon, 18 Aug 2008 05:26:38 +0000 (01:26 -0400)]
x86, um: untangle uml ldt.h

* turn asm/ldt.h into ldt.h; update the (very few) users
* take host_ldt.h into sysdep, kill symlink mess
* includes of asm/arch/ldt.h turn into asm/ldt.h now

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of more uml asm/arch uses
Al Viro [Mon, 18 Aug 2008 04:19:01 +0000 (00:19 -0400)]
x86, um: get rid of more uml asm/arch uses

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: remove dead header (uml module-generic.h; never used these days)
Al Viro [Mon, 18 Aug 2008 04:14:39 +0000 (00:14 -0400)]
x86, um: remove dead header (uml module-generic.h; never used these days)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml signal.h
Al Viro [Mon, 18 Aug 2008 04:12:41 +0000 (00:12 -0400)]
x86, um: get rid of uml signal.h

the only theoretical reason for it these days is ppc; aside of uml/ppc
being dead, do_signal() would be happier in arch/powerpc/kernel/signal.h
anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: sanitize uml sigcontext.h uses
Al Viro [Mon, 18 Aug 2008 03:58:32 +0000 (23:58 -0400)]
x86, um: sanitize uml sigcontext.h uses

a) the only difference between sigcontext and sysdep/sigcontext
is that the former contains externs for two long-dead functions.
Removed, switched the only user to sysdep/sigcontext

b) asm/sigcontext.h is removable - that of underlying architecture
would get used.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: now we can get rid of trivial uml headers
Al Viro [Mon, 18 Aug 2008 02:54:55 +0000 (22:54 -0400)]
x86, um: now we can get rid of trivial uml headers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: ... and asm-x86 move
Al Viro [Mon, 18 Aug 2008 01:05:42 +0000 (21:05 -0400)]
x86, um: ... and asm-x86 move

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: initial part of asm-um move
Al Viro [Sun, 17 Aug 2008 23:13:17 +0000 (19:13 -0400)]
x86, um: initial part of asm-um move

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: take arch/um/include/* out of the way
Al Viro [Sun, 17 Aug 2008 17:48:37 +0000 (13:48 -0400)]
x86, um: take arch/um/include/* out of the way

We can't just plop asm/* into it - userland helpers are built with it
in search path and seeing asm/* show up there suddenly would be a bad
idea.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoACPI: fix ia64 build warning
Len Brown [Thu, 23 Oct 2008 05:47:29 +0000 (01:47 -0400)]
ACPI: fix ia64 build warning

arch/ia64/sn/kernel/io_acpi_init.c:361: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'bugzilla-11715' into test
Len Brown [Thu, 23 Oct 2008 05:28:19 +0000 (01:28 -0400)]
Merge branch 'bugzilla-11715' into test

15 years agocifs: handle the TCP_Server_Info->tsk field more carefully
Jeff Layton [Wed, 22 Oct 2008 17:57:07 +0000 (13:57 -0400)]
cifs: handle the TCP_Server_Info->tsk field more carefully

cifs: handle the TCP_Server_Info->tsk field more carefully

We currently handle the TCP_Server_Info->tsk field without any locking,
but with some half-measures to try and prevent races. These aren't
really sufficient though. When taking down cifsd, use xchg() to swap
the contents of the tsk field with NULL so we don't end up trying
to send it more than one signal. Also, don't allow cifsd to exit until
the signal is received if we expect one.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: fix unlinking of rename target when server doesn't support open file renames
Jeff Layton [Wed, 22 Oct 2008 17:57:01 +0000 (13:57 -0400)]
cifs: fix unlinking of rename target when server doesn't support open file renames

cifs: fix unlinking of rename target when server doesn't support open file renames

The patch to make cifs_rename undoable broke renaming one file on top of
another when the server doesn't support busy file renames. Remove the
code that uses busy file renames to unlink the target file, and just
have it call cifs_unlink. If the rename of the source file fails, then
the unlink won't be undoable, but hopefully that's rare enough that it
won't be a problem.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoACPI: hack around sysfs warning with link order
Zhao Yakui [Fri, 17 Oct 2008 08:33:57 +0000 (16:33 +0800)]
ACPI: hack around sysfs warning with link order

    There exists the following warning message will appear after the
following commit is merged.
   >commit f2e969acd6d5981e6b1272810002558650d0736e
   >Author: Zhao Yakui <yakui.zhao@intel.com>
   >Date:   Mon Aug 11 14:57:50 2008 +0800
    >ACPI: Add "acpi.power_nocheck=1" to disable power state check in
power transition:

   >WARNING: at linux-2.6/fs/sysfs/dir.c:463  sysfs_add_one+0x33/0x39()
   >sysfs: duplicate filename 'acpi' can not be created
   >kobject_add_internal failed for acpi with -EEXIST, don't try to register
            things with the same name in the same directory

   In the above commit the "acpi.power_nocheck" module parameter is defined
in drivers/acpi/power.c file. As several module parameters using the same ACPI
prefix are defined in the different files(for example: power_nocheck is
defined in drivers/acpi/power.c,debug_layer/debug_level are defined in
drivers/acpi/debug.c) and there exists another module between them, the
warning message will be printed when using the current generic param code.
(In the function of param_sysfs_init).

   In fact when ACPI is selected, the drivers/acpi/power will also be compiled
as built-in kernel.So this issue can be fixed by the following approach.
   workaround it by adjusting the module link order in drivers/acpi/Makefile.
In such case the module parameter using the same prefix(ACPI) are put together
in the param data section.

   Of course the better solution is to fix it in generic param code related
with sysfs.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
Len Brown [Thu, 23 Oct 2008 04:45:18 +0000 (00:45 -0400)]
ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n

drivers/acpi/sleep/main.c:27: warning: ‘acpi_target_sleep_state’ defined but not used

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agointel_menlo: fix build warning
Len Brown [Thu, 23 Oct 2008 04:43:47 +0000 (00:43 -0400)]
intel_menlo: fix build warning

drivers/misc/intel_menlow.c:107: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘long long unsigned int’

Signed-off-by: Len Brown <len.brown@intel.com>