This patch provides a function to move account information of a page
between mem_cgroups and rewrite force_empty to make use of this.
This moving of page_cgroup is done under
- lru_lock of source/destination mem_cgroup is held.
- lock_page_cgroup() is held.
Then, a routine which touches pc->mem_cgroup without lock_page_cgroup()
should confirm pc->mem_cgroup is still valid or not. Typical code can be
following.
(while page is not under lock_page())
mem = pc->mem_cgroup;
mz = page_cgroup_zoneinfo(pc)
spin_lock_irqsave(&mz->lru_lock);
if (pc->mem_cgroup == mem)
...../* some list handling */
spin_unlock_irqrestore(&mz->lru_lock);
Of course, better way is
lock_page_cgroup(pc);
....
unlock_page_cgroup(pc);
But you should confirm the nest of lock and avoid deadlock.
If you treats page_cgroup from mem_cgroup's LRU under mz->lru_lock,
you don't have to worry about what pc->mem_cgroup points to.
moved pages are added to head of lru, not to tail.
Expected users of this routine is:
- force_empty (rmdir)
- moving tasks between cgroup (for moving account information.)
- hierarchy (maybe useful.)
force_empty(rmdir) uses this move_account and move pages to its parent.
This "move" will not cause OOM (I added "oom" parameter to try_charge().)
If the parent is busy (not enough memory), force_empty calls try_to_free_page()
and reduce usage.
Purpose of this behavior is
- Fix "forget all" behavior of force_empty and avoid leak of accounting.
- By "moving first, free if necessary", keep pages on memory as much as
possible.
Adding a switch to change behavior of force_empty to
- free first, move if necessary
- free all, if there is mlocked/busy pages, return -EBUSY.
is under consideration. (I'll add if someone requtests.)
This patch also removes memory.force_empty file, a brutal debug-only interface.
memcg: do not recalculate section unnecessarily in init_section_page_cgroup
In init_section_page_cgroup() the section a given pfn belongs to is
calculated at the top of the function and, despite the fact that the
pfn/section correspondence does not change, it is recalculated further
down the same function. By computing this just once and reusing that
value we save some bytes in the object file and do not waste CPU cycles.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Now, management of "charge" under page migration is done under following
manner. (Assume migrate page contents from oldpage to newpage)
before
- "newpage" is charged before migration.
at success.
- "oldpage" is uncharged at somewhere(unmap, radix-tree-replace)
at failure
- "newpage" is uncharged.
- "oldpage" is charged if necessary (*1)
But (*1) is not reliable....because of GFP_ATOMIC.
This patch tries to change behavior as following by charge/commit/cancel ops.
before
- charge PAGE_SIZE (no target page)
success
- commit charge against "newpage".
failure
- commit charge against "oldpage".
(PCG_USED bit works effectively to avoid double-counting)
- if "oldpage" is obsolete, cancel charge of PAGE_SIZE.
Now, most of callers of mem_cgroup_charge_xxx functions uses GFP_KERNEL.
I think that this is from the fact that page_cgroup *was* dynamically
allocated.
But now, we allocate all page_cgroup at boot. And
mem_cgroup_try_to_free_pages() reclaim memory from GFP_HIGHUSER_MOVABLE +
specified GFP_RECLAIM_MASK.
* This is because we just want to reduce memory usage.
"Where we should reclaim from ?" is not a problem in memcg.
This patch modifies gfp masks to be GFP_HIGUSER_MOVABLE if possible.
Note: This patch is not for fixing behavior but for showing sane information
in source code.
memcg: introduce charge-commit-cancel style of functions
There is a small race in do_swap_page(). When the page swapped-in is
charged, the mapcount can be greater than 0. But, at the same time some
process (shares it ) call unmap and make mapcount 1->0 and the page is
uncharged.
For fixing this, I added a new interface.
- charge
account to res_counter by PAGE_SIZE and try to free pages if necessary.
- commit
register page_cgroup and add to LRU if necessary.
- cancel
uncharge PAGE_SIZE because of do_swap_page failure.
CPUA
(1) charge (always)
(2) set page's rmap (mapcount > 0)
(3) commit charge was necessary or not after set_pte().
This protocol uses PCG_USED bit on page_cgroup for avoiding over accounting.
Usual mem_cgroup_charge_common() does charge -> commit at a time.
And this patch also adds following function to clarify all charges.
- mem_cgroup_newpage_charge() ....replacement for mem_cgroup_charge()
called against newly allocated anon pages.
- mem_cgroup_charge_migrate_fixup()
called only from remove_migration_ptes().
we'll have to rewrite this later.(this patch just keeps old behavior)
This function will be removed by additional patch to make migration
clearer.
Good for clarifying "what we do"
Then, we have 4 following charge points.
- newpage
- swap-in
- add-to-cache.
- migration.
Serge E. Hallyn [Thu, 8 Jan 2009 02:07:46 +0000 (18:07 -0800)]
devices cgroup: allow mkfifo
The devcgroup_inode_permission() hook in the devices whitelist cgroup has
always bypassed access checks on fifos. But the mknod hook did not. The
devices whitelist is only about block and char devices, and fifos can't
even be added to the whitelist, so fifos can't be created at all except by
tasks which have 'a' in their whitelist (meaning they have access to all
devices).
Fix the behavior by bypassing access checks to mkfifo.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Paul Menage <menage@google.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: James Morris <jmorris@namei.org> Reported-by: Daniel Lezcano <dlezcano@fr.ibm.com> Cc: <stable@kernel.org> [2.6.27.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Menage [Thu, 8 Jan 2009 02:07:44 +0000 (18:07 -0800)]
cgroups: make cgroup_path() RCU-safe
Fix races between /proc/sched_debug by freeing cgroup objects via an RCU
callback. Thus any cgroup reference obtained from an RCU-safe source will
remain valid during the RCU section. Since dentries are also RCU-safe,
this allows us to traverse up the tree safely.
Additionally, make cgroup_path() check for a NULL cgrp->dentry to avoid
trying to report a path for a partially-created cgroup.
[lizf@cn.fujitsu.com: call deactive_super() in cgroup_diput()] Signed-off-by: Paul Menage <menage@google.com> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Tested-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Li Zefan [Thu, 8 Jan 2009 02:07:42 +0000 (18:07 -0800)]
cgroups: add inactive subsystems to rootnode.subsys_list
Though for an inactive hierarchy, we have subsys->root == &rootnode, but
rootnode's subsys_list is always empty.
This conflicts with the code in find_css_set():
for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
...
if (ss->root->subsys_list.next == &ss->sibling) {
...
}
}
if (list_empty(&rootnode.subsys_list)) {
...
}
The above code assumes rootnode.subsys_list links all inactive
hierarchies.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Li Zefan [Thu, 8 Jan 2009 02:07:41 +0000 (18:07 -0800)]
cgroups: make root_list contains active hierarchies only
Don't link rootnode to the root list, so root_list contains active
hierarchies only as the comment indicates. And rename for_each_root() to
for_each_active_root().
Also remove redundant check in cgroup_kill_sb().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lai Jiangshan [Thu, 8 Jan 2009 02:07:40 +0000 (18:07 -0800)]
cgroups: remove rcu_read_lock() in cgroupstats_build()
cgroup_iter_* do not need rcu_read_lock().
In cgroup_enable_task_cg_lists(), do_each_thread() and while_each_thread()
are protected by RCU, it's OK, for write_lock(&css_set_lock) implies
rcu_read_lock() in non-RT kernel.
If we need explicit rcu_read_lock(), we should add rcu_read_lock() in
cgroup_enable_task_cg_lists(), not cgroup_iter_*.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lai Jiangshan [Thu, 8 Jan 2009 02:07:39 +0000 (18:07 -0800)]
cgroups: call find_css_set() safely in cgroup_attach_task()
In cgroup_attach_task(), tsk maybe exit when we call find_css_set(). and
find_css_set() will access to invalid css_set.
This patch increases the count before get_css_set(), and decreases it
after find_css_set().
NOTE:
css_set's refcount is also taskcount, after this patch applied, taskcount
may be off-by-one WHEN cgroup_lock() is not held. but I reviewed other
code which use taskcount, they are still correct. No regression found by
reviewing and simply testing.
So I do not use two counters in css_set. (one counter for taskcount, the
other for refcount. like struct mm_struct) If this fix cause regression,
we will use two counters in css_set.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
All these place we have held cgroup_lock() or we don't dereference to
struct cgroupfs_root. It's means wo don't need RCU when use struct
cgroup_subsys.root, and we should not put struct cgroupfs_root protected
by RCU.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Reviewed-by: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lai Jiangshan [Thu, 8 Jan 2009 02:07:36 +0000 (18:07 -0800)]
cgroups: fix cgroup_iter_next() bug
We access res->cgroups without the task_lock(), so res->cgroups may be
changed. it's unreliable, and "if (l == &res->cgroups->tasks)" may be
false forever.
We don't need add any lock for fixing this bug. we just access to struct
css_set by struct cg_cgroup_link, not by struct task_struct.
Since we hold css_set_lock, struct cg_cgroup_link is reliable.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Reviewed-by: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Li Zefan [Thu, 8 Jan 2009 02:07:33 +0000 (18:07 -0800)]
cgroups: remove some redundant NULL checks
- In cgroup_clone(), if vfs_mkdir() returns successfully,
dentry->d_fsdata will be the pointer to the newly created
cgroup and won't be NULL.
- a cgroup file's dentry->d_fsdata won't be NULL, guaranteed
by cgroup_add_file().
- When walking through the subsystems of a cgroup_fs (using
for_each_subsys), cgrp->subsys[ss->subsys_id] won't be NULL,
guaranteed by cgroup_create().
(Also remove 2 unused variables in cgroup_rmdir().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch make CGROUP related configs be a sub-menu and makes 1st level
configs of "General Setup" shorter.
including following additional changes
- add help comment about CGROUPS and GROUP_SCHED.
- moved MM_OWNER config to the bottom.
(for good indent in menuconfig)
Jan Kara [Thu, 8 Jan 2009 02:07:29 +0000 (18:07 -0800)]
quota: don't set grace time when user isn't above softlimit
do_set_dqblk() allowed SETDQBLK quotactl to set user's grace time even if
user was not above his softlimit. This does not make much sence and by
coincidence causes quota code to omit softlimit warning when user really
exceeds softlimit. This patch makes do_set_dqblk() reset user's grace
time if he has not exceeded softlimit.
Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
coda: fix fs/coda/sysctl.c build warnings when !CONFIG_SYSCTL
Fix
fs/coda/sysctl.c:14: warning: 'fs_table_header' defined but not used
fs/coda/sysctl.c:44: warning: 'fs_table' defined but not used
these are only used when CONFIG_SYSCTL is defined.
Signed-off-by: Richard A. Holden III <aciddeath@gmail.com> Cc: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Duane Griffin [Thu, 8 Jan 2009 02:07:26 +0000 (18:07 -0800)]
ext3: tighten restrictions on inode flags
At the moment there are few restrictions on which flags may be set on
which inodes. Specifically DIRSYNC may only be set on directories and
IMMUTABLE and APPEND may not be set on links. Tighten that to disallow
TOPDIR being set on non-directories and only NODUMP and NOATIME to be set
on non-regular file, non-directories.
Introduces a flags masking function which masks flags based on mode and
use it during inode creation and when flags are set via the ioctl to
facilitate future consistency.
Signed-off-by: Duane Griffin <duaneg@dghda.com> Acked-by: Andreas Dilger <adilger@sun.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Duane Griffin [Thu, 8 Jan 2009 02:07:26 +0000 (18:07 -0800)]
ext3: don't inherit inappropriate inode flags from parent
At present INDEX is the only flag that new ext3 inodes do NOT inherit from
their parent. In addition prevent the flags DIRTY, ECOMPR, IMAGIC and
TOPDIR from being inherited. List inheritable flags explicitly to prevent
future flags from accidentally being inherited.
This fixes the TOPDIR flag inheritance bug reported at
http://bugzilla.kernel.org/show_bug.cgi?id=9866.
Signed-off-by: Duane Griffin <duaneg@dghda.com> Acked-by: Andreas Dilger <adilger@sun.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pekka Enberg [Thu, 8 Jan 2009 02:07:25 +0000 (18:07 -0800)]
ext3: allocate ->s_blockgroup_lock separately
As spotted by kmemtrace, struct ext3_sb_info is 17152 bytes on 64-bit
which makes it a very bad fit for SLAB allocators. The culprit of the
wasted memory is ->s_blockgroup_lock which can be as big as 16 KB when
NR_CPUS >= 32.
To fix that, allocate ->s_blockgroup_lock, which fits nicely in a order 2
page in the worst case, separately. This shinks down struct ext3_sb_info
enough to fit a 1 KB slab cache so now we allocate 16 KB + 1 KB instead of
32 KB saving 15 KB of memory.
Acked-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Josef Bacik [Thu, 8 Jan 2009 02:07:24 +0000 (18:07 -0800)]
jbd: improve fsync batching
There is a flaw with the way jbd handles fsync batching. If we fsync() a
file and we were not the last person to run fsync() on this fs then we
automatically sleep for 1 jiffie in order to wait for new writers to join
into the transaction before forcing the commit. The problem with this is
that with really fast storage (ie a Clariion) the time it takes to commit
a transaction to disk is way faster than 1 jiffie in most cases, so
sleeping means waiting longer with nothing to do than if we just committed
the transaction and kept going. Ric Wheeler noticed this when using
fs_mark with more than 1 thread, the throughput would plummet as he added
more threads.
This patch attempts to fix this problem by recording the average time in
nanoseconds that it takes to commit a transaction to disk, and what time
we started the transaction. If we run an fsync() and we have been running
for less time than it takes to commit the transaction to disk, we sleep
for the delta amount of time and then commit to disk. We acheive
sub-jiffie sleeping using schedule_hrtimeout. This means that the wait
time is auto-tuned to the speed of the underlying disk, instead of having
this static timeout. I weighted the average according to somebody's
comments (Andreas Dilger I think) in order to help normalize random
outliers where we take way longer or way less time to commit than the
average. I also have a min() check in there to make sure we don't sleep
longer than a jiffie in case our storage is super slow, this was requested
by Andrew.
I unfortunately do not have access to a Clariion, so I had to use a
ramdisk to represent a super fast array. I tested with a SATA drive with
barrier=1 to make sure there was no regression with local disks, I tested
with a 4 way multipathed Apple Xserve RAID array and of course the
ramdisk. I ran the following command
Signed-off-by: Josef Bacik <jbacik@redhat.com> Cc: Andreas Dilger <adilger@sun.com> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Ric Wheeler <rwheeler@redhat.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Duane Griffin [Thu, 8 Jan 2009 02:07:21 +0000 (18:07 -0800)]
ext2: tighten restrictions on inode flags
At the moment there are few restrictions on which flags may be set on
which inodes. Specifically DIRSYNC may only be set on directories and
IMMUTABLE and APPEND may not be set on links. Tighten that to disallow
TOPDIR being set on non-directories and only NODUMP and NOATIME to be set
on non-regular file, non-directories.
Introduces a flags masking function which masks flags based on mode and
use it during inode creation and when flags are set via the ioctl to
facilitate future consistency.
Signed-off-by: Duane Griffin <duaneg@dghda.com> Acked-by: Andreas Dilger <adilger@sun.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Duane Griffin [Thu, 8 Jan 2009 02:07:20 +0000 (18:07 -0800)]
ext2: don't inherit inappropriate inode flags from parent
At present BTREE/INDEX is the only flag that new ext2 inodes do NOT
inherit from their parent. In addition prevent the flags DIRTY, ECOMPR,
INDEX, IMAGIC and TOPDIR from being inherited. List inheritable flags
explicitly to prevent future flags from accidentally being inherited.
This fixes the TOPDIR flag inheritance bug reported at
http://bugzilla.kernel.org/show_bug.cgi?id=9866.
Signed-off-by: Duane Griffin <duaneg@dghda.com> Acked-by: Andreas Dilger <adilger@sun.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pekka J Enberg [Thu, 8 Jan 2009 02:07:19 +0000 (18:07 -0800)]
ext2: allocate ->s_blockgroup_lock separately
As spotted by kmemtrace, struct ext2_sb_info is 17024 bytes on 64-bit
which makes it a very bad fit for SLAB allocators. The culprit of the
wasted memory is ->s_blockgroup_lock which can be as big as 16 KB when
NR_CPUS >= 32.
To fix that, allocate ->s_blockgroup_lock, which fits nicely in a order 2
page in the worst case, separately. This shinks down struct ext2_sb_info
enough to fit a 1 KB slab cache so now we allocate 16 KB + 1 KB instead of
32 KB saving 15 KB of memory.
Acked-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jüri Reitel [Thu, 8 Jan 2009 02:07:16 +0000 (18:07 -0800)]
rtc-ds1307: remove legacy probe() checks
Remove RTC register value checks from the rtc-ds1307 probe() function.
They were left over from the legacy style I2C driver, which had to defend
against finding a non-RTC chip when the driver was probed.
Also fix a minor glitch in the alarm support: DS1307 chips don't have
alarms, so name those methods after one of the chips which actually *do*
have alarms (DS1337).
Alex Zeffertt [Thu, 8 Jan 2009 02:07:11 +0000 (18:07 -0800)]
xen: add xenfs to allow usermode <-> Xen interaction
The xenfs filesystem exports various interfaces to usermode. Initially
this exports a file to allow usermode to interact with xenbus/xenstore.
Traditionally this appeared in /proc/xen. Rather than extending procfs,
this patch adds a backward-compat mountpoint on /proc/xen, and provides
a xenfs filesystem which can be mounted there.
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Kleikamp [Thu, 8 Jan 2009 15:46:31 +0000 (09:46 -0600)]
async: Don't call async_synchronize_full_special() while holding sb_lock
sync_filesystems() shouldn't be calling async_synchronize_full_special
while holding a spinlock. The second while loop in that function is the
right place for this anyway.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Reported-by: Grissiom <chaos.proton@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Work around branch tracer warning.
sparc64: Fix unsigned long long warnings in drivers.
sparc64: Use unsigned long long for u64.
sparc: refactor code in fault_32.c
sparc64: refactor code in init_64.c
sparc64: refactor code in viohs.c
sparc: make proces_ver_nack a bit more readable
Linus Torvalds [Thu, 8 Jan 2009 01:21:24 +0000 (17:21 -0800)]
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.29' of git://linux-nfs.org/~bfields/linux: (67 commits)
nfsd: get rid of NFSD_VERSION
nfsd: last_byte_offset
nfsd: delete wrong file comment from nfsd/nfs4xdr.c
nfsd: git rid of nfs4_cb_null_ops declaration
nfsd: dprint each op status in nfsd4_proc_compound
nfsd: add etoosmall to nfserrno
NFSD: FIDs need to take precedence over UUIDs
SUNRPC: The sunrpc server code should not be used by out-of-tree modules
svc: Clean up deferred requests on transport destruction
nfsd: fix double-locks of directory mutex
svc: Move kfree of deferral record to common code
CRED: Fix NFSD regression
NLM: Clean up flow of control in make_socks() function
NLM: Refactor make_socks() function
nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
SUNRPC: Ensure the server closes sockets in a timely fashion
NFSD: Add documenting comments for nfsctl interface
NFSD: Replace open-coded integer with macro
NFSD: Fix a handful of coding style issues in write_filehandle()
NFSD: clean up failover sysctl function naming
...
V4L/DVB (10191a): Update MAINTAINERS entries on media drivers
This patch updates the MAINTAINERS entries for the media drivers.
We are doing a few changes during 2009 to improve patch handling for
drivers/media stuff.
Currently, v4l-dvb-maintainer list at linuxtv.org were used to to be v4l/dvb
driver maintainers ML, in order to keep track of patch merge requests and to
receive bug fixes. This list allows posting for everybody, but, in order to
avoid spam, the user subscribe/unsubscribe at the ML is moderated. Other
development discussions and end-user forums happened on two separated ML (one
for V4L and another for DVB).
At the beginning of 2009, we've created linux-media@vger.kernel.org, meaning to
be the main upstream development mailing list for drivers/media, including V4L
and DVB core and drivers.
The choice for vger.kernel.org were due to the fact that most of upstream lists
are there. Also, its anti-spam filtering rules are better than what we
currently have at linuxtv.org.
For now, both video4linux-list and linux-dvb ML will remain active, but more
focused on end users. It is expected that those lists will gradually be
replaced also by linux-media@vger.kernel.org.
This patch reflect those changes at linux MAINTAINERS file.
Since the development and bug fix discussions will now happen at
linux-media@vger.kernel.org, this patch does the following changes
- replaces v4l-dvb-maintainer ML for the new
linux-media@vger.kernel.org;
- replaces video4linux ML for the new linux-media@vger.kernel.org;
While here, it also:
- Fixes the existing -git tree entries for drivers/media (since the
repository name changed);
- Adds the missing drivers/media -git tree entry on a few maintainers
entries that don't point to a tree.
As Randy Dunlap <randy.dunlap@oracle.com> reported, cx88 has some compilation issues:
drivers/built-in.o: In function `cx88_call_i2c_clients':
(.text+0x20af17): undefined reference to `videobuf_dvb_get_frontend'
drivers/built-in.o: In function `cx8802_probe':
cx88-mpeg.c:(.devinit.text+0x268c4): undefined reference to `videobuf_dvb_alloc_frontend'
cx88-mpeg.c:(.devinit.text+0x268ea): undefined reference to `videobuf_dvb_dealloc_frontends'
After carefully examining the code, with the current code, several cx88 drivers
(cx8800, cx8802, cx88_dvb and cx88_blackbird) should be compiled as a module,
if one of them is marked as such. Just fixing Kconfig could create a very complex
set of rules. Also, this hides a problem with the current approach where the dvb
functionality weren't confined inside dvb module.
What happens is that:
- cx88-i2c (part of cx8800) has some special rules if DVB;
- cx88-mpeg (cx8802 module) has also part of DVB init code;
- cx88-dvb has the rest of the dvb code;
- cx88-blackbird can be used with cx88-mpeg, having cx88-dvb or not.
So, instead of doing some tricks at Kconfig and wait for a next breakage,
this patch moves the dvb code inside cx88-i2c and cx88-mpeg into cx88-dvb.
Another problem is that cx8802 were being compiled, even without cx88-dvb
and cx88-blackbird modules.
While on this code, let's fix also a reported problem:
http://www.linuxtv.org/pipermail/linux-dvb/2009-January/031225.html
A solution for the issue were proposed here:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg00021.html
Thanks to Randy, Andy, Gregoire and Thomas for helping us to detect
and solve the issues.
V4L/DVB (10189): dm1105: Fix build with INPUT=m and DVB_DM1105=y
As reported by Randy Dunlap <randy.dunlap@oracle.com>:
With CONFIG_INPUT=m and CONFIG_DVB_DM1105=y:
drivers/built-in.o: In function `input_sync':
dm1105.c:(.text+0x120c33): undefined reference to `input_event'
drivers/built-in.o: In function `dm1105_emit_key':
dm1105.c:(.text+0x120c6c): undefined reference to `input_event'
dm1105.c:(.text+0x120c82): undefined reference to `input_event'
dm1105.c:(.text+0x120cb2): undefined reference to `input_event'
dm1105.c:(.text+0x120cd1): undefined reference to `input_event'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xd8ae): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xd9f6): undefined reference to `input_register_device'
drivers/built-in.o: In function `dm1105_ir_init':
(.devinit.text+0xda09): undefined reference to `input_free_device'
drivers/built-in.o: In function `dm1105_ir_exit':
(.devexit.text+0xcde): undefined reference to `input_unregister_device'
This is due to the lack of a dependency between dm1105 and CONFIG_INPUT
Cc: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Sat, 3 Jan 2009 19:53:10 +0000 (16:53 -0300)]
V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc
This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
Don't call tda8290_init_tuner unless we have either a TDA8275 or TDA8275A
present. Calling this function will cause a TDA18271 to get sick, so we
should only call it when needed.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (10181): v4l2-device: Fix some sparse warnings
/home/v4l/master/v4l/v4l2-device.c:32:2: warning: Using plain integer as NULL pointer
/home/v4l/master/v4l/v4l2-device.c:64:2: warning: Using plain integer as NULL pointer
V4L/DVB (10180): drivers/media: Fix a number of sparse warnings
anysee.c:44:5: warning: symbol 'dvb_usb_anysee_delsys' was not declared. Should it be static?
cx24116.c:378:3: warning: symbol 'CX24116_MODFEC_MODES' was not declared. Should it be static?
stb0899_algo.c:57:5: warning: symbol 'stb0899_get_srate' was not declared. Should it be static?
stb0899_algo.c:766:6: warning: symbol 'Log2Int' was not declared. Should it be static?
stb0899_drv.c:137:20: warning: symbol 'stb0899_quant_tab' was not declared. Should it be static?
stb0899_drv.c:180:20: warning: symbol 'stb0899_est_tab' was not declared. Should it be static?
stb0899_drv.c:220:5: warning: symbol '_stb0899_read_reg' was not declared. Should it be static?
budget-ci.c:1348:23: warning: symbol 'tt3200_stb6100_config' was not declared. Should it be static?
/home/v4l/master/v4l/cx25840-core.c:190:6: warning: symbol 'cx25840_work_handler' was not declared. Should it be static?
/home/v4l/master/v4l/m5602_s5k83a.c:116:6: warning: symbol 's5k83a_dump_registers' was not declared. Should it be static?
/home/v4l/master/v4l/tda8290.c:233:7: warning: symbol 'i' shadows an earlier one
/home/v4l/master/v4l/tda8290.c:178:3: warning: symbol 'fm_mode' was not declared. Should it be static?
V4L/DVB (10178): dvb_frontend: Fix some sparse warnings due to static symbols
/home/v4l/master/v4l/dvb_frontend.c:838:19: warning: symbol 'dtv_cmds' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1035:6: warning: symbol 'dtv_property_dump' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1066:5: warning: symbol 'is_legacy_delivery_system' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1080:6: warning: symbol 'dtv_property_cache_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1132:6: warning: symbol 'dtv_property_legacy_params_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1187:6: warning: symbol 'dtv_property_adv_params_sync' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1222:6: warning: symbol 'dtv_property_cache_submit' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1253:5: warning: symbol 'dtv_property_process_get' was not declared. Should it be static?
/home/v4l/master/v4l/dvb_frontend.c:1362:5: warning: symbol 'dtv_property_process_set' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-core.c:396:25: warning: symbol 'outputs' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-input.c:324:6: warning: symbol 'em28xx_ir_start' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-cards.c:1925:5: warning: symbol 'em28xx_init_dev' was not declared. Should it be static?
Linus Torvalds [Wed, 7 Jan 2009 23:41:01 +0000 (15:41 -0800)]
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (98 commits)
PCI PM: Put PM callbacks in the order of execution
PCI PM: Run default PM callbacks for all devices using new framework
PCI PM: Register power state of devices during initialization
PCI PM: Call pci_fixup_device from legacy routines
PCI PM: Rearrange code in pci-driver.c
PCI PM: Avoid touching devices behind bridges in unknown state
PCI PM: Move pci_has_legacy_pm_support
PCI PM: Power-manage devices without drivers during suspend-resume
PCI PM: Add suspend counterpart of pci_reenable_device
PCI PM: Fix poweroff and restore callbacks
PCI: Use msleep instead of cpu_relax during ASPM link retraining
PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
PCI: PCIe portdrv: Rearrange code so that related things are together
PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
PCI: PCIe portdrv: Add kerneldoc comments to some core functions
x86/PCI: Do not use interrupt links for devices using MSI-X
net: sfc: Use pci_clear_master() to disable bus mastering
PCI: Add pci_clear_master() as opposite of pci_set_master()
PCI hotplug: remove redundant test in cpq hotplug
PCI: pciehp: cleanup register and field definitions
...
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (123 commits)
wimax/i2400m: add CREDITS and MAINTAINERS entries
wimax: export linux/wimax.h and linux/wimax/i2400m.h with headers_install
i2400m: Makefile and Kconfig
i2400m/SDIO: TX and RX path backends
i2400m/SDIO: firmware upload backend
i2400m/SDIO: probe/disconnect, dev init/shutdown and reset backends
i2400m/SDIO: header for the SDIO subdriver
i2400m/USB: TX and RX path backends
i2400m/USB: firmware upload backend
i2400m/USB: probe/disconnect, dev init/shutdown and reset backends
i2400m/USB: header for the USB bus driver
i2400m: debugfs controls
i2400m: various functions for device management
i2400m: RX and TX data/control paths
i2400m: firmware loading and bootrom initialization
i2400m: linkage to the networking stack
i2400m: Generic probe/disconnect, reset and message passing
i2400m: host/device procotol and core driver definitions
i2400m: documentation and instructions for usage
wimax: Makefile, Kconfig and docbook linkage for the stack
...
* git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async:
async: don't do the initcall stuff post boot
bootchart: improve output based on Dave Jones' feedback
async: make the final inode deletion an asynchronous event
fastboot: Make libata initialization even more async
fastboot: make the libata port scan asynchronous
fastboot: make scsi probes asynchronous
async: Asynchronous function calls to speed up kernel boot
David Miller [Wed, 7 Jan 2009 23:30:05 +0000 (15:30 -0800)]
topology: Fix sparc64 build.
Due to changeset ba84be2338d3a2b6020d39279335bb06fcd332e1 ("remove
linux/hardirq.h from asm-generic/local.h") the sparc64 build started
failing on drivers/base/topology.c:
drivers/base/topology.c: In function ‘show_physical_package_id’:
drivers/base/topology.c:103: error: implicit declaration of function ‘cpu_data’
drivers/base/topology.c:103: error: request for member ‘proc_id’ in something not a structure or union
drivers/base/topology.c: In function ‘show_core_id’:
drivers/base/topology.c:106: error: request for member ‘core_id’ in something not a structure or union
Adding the obvious fix of including asm/cpudata.h into asm/topology.h on
sparc64 doesn't fix it, in fact it makes things worse because of the
header file dependency chain:
include/linux/slub_def.h: In function ‘kmalloc_large’:
include/linux/slub_def.h:209: error: implicit declaration of function ‘__get_free_pages’
include/linux/slub_def.h:209: error: ‘__GFP_COMP’ undeclared (first use in this function)
include/linux/slub_def.h:209: error: (Each undeclared identifier is reported only once
include/linux/slub_def.h:209: error: for each function it appears in.)
include/linux/slub_def.h:209: warning: cast to pointer from integer of different size
The simplest thing to do is to add yet another one-off hack like parts
of the guilty changeset did, by putting an explicit linux/hardirq.h
include into drivers/base/topology.c
Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Benny Halevy [Mon, 15 Dec 2008 17:42:03 +0000 (19:42 +0200)]
nfsd: last_byte_offset
refactor the nfs4 server lock code to use last_byte_offset
to compute the last byte covered by the lock. Check for overflow
so that the last byte is set to NFS4_MAX_UINT64 if offset + len
wraps around.
Also, use NFS4_MAX_UINT64 for ~(u64)0 where appropriate.
Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Dean Hildebrand [Mon, 15 Dec 2008 17:40:15 +0000 (19:40 +0200)]
nfsd: add etoosmall to nfserrno
Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Tom Tucker [Mon, 5 Jan 2009 21:21:19 +0000 (15:21 -0600)]
svc: Clean up deferred requests on transport destruction
A race between svc_revisit and svc_delete_xprt can result in
deferred requests holding references on a transport that can never be
recovered because dead transports are not enqueued for subsequent
processing.
Check for XPT_DEAD in revisit to clean up completing deferrals on a dead
transport and sweep a transport's deferred queue to do the same for queued
but unprocessed deferrals.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
kbuild: add a symlink to the source for separate objdirs
kconfig: add script to manipulate .config files on the command line
kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
bootchart: improve output based on Dave Jones' feedback
fix modules_install via NFS
qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types
Wolfram Sang [Tue, 6 Jan 2009 14:12:27 +0000 (15:12 +0100)]
kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
The text always mentions ...bin.o_shipped, just the example makefiles
actually use ...bin_shipped. It was corrected in one place some time
ago, these ones seem to have been forgotten.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Andi Kleen [Sat, 3 Jan 2009 02:21:42 +0000 (03:21 +0100)]
kbuild: add a symlink to the source for separate objdirs
I have some scripts which need to map back to the source directory
from an objdir. This was so far done by parsing the Makefile,
but the Makefile format changes occasionally and breaks my scripts
then.
To make this more reliable add a "source" symlink back.
Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Andi Kleen [Sat, 3 Jan 2009 02:21:41 +0000 (03:21 +0100)]
kconfig: add script to manipulate .config files on the command line
I often change single options in .config files. Instead of using
an editor or one of the frontends it's convenient to do this from
the command line. It's also useful to do from automated build scripts
when building different variants from a base config file.
I extracted most of the CONFIG manipulation code from one of my
build scripts into a new shell script scripts/config
The script is not integrated with the normal Kconfig machinery
and doesn't do any checking against Kconfig files, but just manipulates
that text format. This is always done at make time anyways.
I believe this script would be a useful standard addition for scripts/*
Sample usage:
./scripts/config --disable smp
Disable SMP in .config file
./scripts/config --file otherdir/.config --module e1000e
Enable E1000E as module in otherdir/.config
./scripts/config --state smp
y
Check state of config option CONFIG_SMP
After merging into git please make scripts/config executable
Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Jike Song [Mon, 5 Jan 2009 06:57:03 +0000 (14:57 +0800)]
kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/
cscope targets. The Kbuild previously has this feature, but after
moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears.
It's something like this:
$ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope
Signed-off-by: Jike Song <albcamus@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
bootchart: improve output based on Dave Jones' feedback
Dave Jones, in his blog, had some feedback about the bootchart script:
Primarily his complaint was that shorter delays weren't visualized.
The reason for that was that too small delays will have their labels
mixed up in the graph in an unreadable mess.
This patch has a fix for this; for one, it makes the output wider,
so more will fit.
The second part is that smaller delays are now shown with a
much smaller font for the label; while this isn't per se
readable at a 1:1 zoom, at least you can zoom in with most SVG
viewing applications and see what it is you are looking at.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
where the configuration is that the kernel is compiled on a build box
with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by
each test box (full path to this directory is the same on the build box and on
the test boxes). Then, I cd into <destdir>, run 'make modules_install' and get
the error above.
The issue turns out to be that we when we install firmware pick
up the list of firmware blobs from firmware/Makefile.
And this triggers the Makefile rules to update ihex2fw.
There were two solutions for this issue:
1) Move the list of firmware blobs to a separate file
2) Avoid ihex2fw rebuild by moving it to scripts
As I seriously beleive that the list of firmware blobs should be
done in a fundamental different way solution 2) was selected.
Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org>
Anders Larsen [Thu, 1 Jan 2009 16:17:35 +0000 (17:17 +0100)]
qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types
On 2008-12-30 11:32:33, Sam Ravnborg wrote:
> We have added a few additional validation checks of the userspace headers:
...
> 3) We should include <linux/types.h> and not <asm/types.h>
> 4) If we use a __[us]{8,16,32,64} type then we must include <linux/types.h>
Satisfy these requirements for the linux/qnx*.h headers.
Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
J. Bruce Fields [Tue, 6 Jan 2009 18:37:03 +0000 (13:37 -0500)]
nfsd: fix double-locks of directory mutex
A number of nfsd operations depend on the i_mutex to cover more code
than just the fsync, so the approach of 4c728ef583b3d8 "add a vfs_fsync
helper" doesn't work for nfsd. Revert the parts of those patches that
touch nfsd.
Note: we can't, however, remove the logic from vfs_fsync that was needed
only for the special case of nfsd, because a vfs_fsync(NULL,...) call
can still result indirectly from a stackable filesystem that was called
by nfsd. (Thanks to Christoph Hellwig for pointing this out.)
Reported-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Tom Tucker [Mon, 5 Jan 2009 17:12:52 +0000 (11:12 -0600)]
svc: Move kfree of deferral record to common code
The rqstp structure has a pointer to a svc_deferred_req record
that is allocated when requests are deferred. This record is common
to all transports and can be freed in common code.
Move the kfree of the rq_deferred to the common svc_xprt_release
function.
This also fixes a memory leak in the RDMA transport which does not
kfree the dr structure in it's version of the xpo_release_rqst callback.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
David Howells [Mon, 5 Jan 2009 17:19:37 +0000 (17:19 +0000)]
CRED: Fix NFSD regression
Fix a regression in NFSD's permission checking introduced by the credentials
patches. There are two parts to the problem, both in nfsd_setuser():
(1) The return value of set_groups() is -ve if in error, not 0, and should be
checked appropriately. 0 indicates success.
(2) The UID to use for fs accesses is in new->fsuid, not new->uid (which is
0). This causes CAP_DAC_OVERRIDE to always be set, rather than being
cleared if the UID is anything other than 0 after squashing.
Reported-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
J. Bruce Fields [Sat, 20 Dec 2008 19:58:38 +0000 (11:58 -0800)]
nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT
Since nfsv4 allows LOCKT without an open, but the ->lock() method is a
file method, we fake up a struct file in the nfsv4 code with just the
fields we need initialized. But we forgot to initialize the file
operations, with the result that LOCKT never results in a call to the
filesystem's ->lock() method (if it exists).
We could just add that one more initialization. But this hack of faking
up a struct file with only some fields initialized seems the kind of
thing that might cause more problems in the future. We should either do
an open and get a real struct file, or make lock-testing an inode (not a
file) method.
This patch does the former.
Reported-by: Marc Eshel <eshel@almaden.ibm.com> Tested-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Linus Torvalds [Wed, 7 Jan 2009 20:05:32 +0000 (12:05 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: reorder struct fw_card for better cache efficiency
firewire: fix resetting of bus manager retry counter
firewire: improve refcounting of fw_card
firewire: typo in comment
firewire: fix small memory leak at module removal
firewire: fw-sbp2: remove unnecessary locking
ieee1934: dv1394: interrupt enabling/disabling broken on big-endian
ieee1394: dv1394: annotate frame input/output structs as little endian
ieee1394: eth1394: trivial sparse annotations
ieee1394: mark bus_info_data as a __be32 array
ieee1394: replace CSR_SET_BUS_INFO_GENERATION macro
ieee1394: pcilynx: trivial endian annotation
ieee1394: ignore nonzero Bus_Info_Block.max_rom, fetch config ROM in quadlets
ieee1394: consolidate uses of IEEE1934_BUSID_MAGIC
ieee1394: ohci1394: flush MMIO writes before delay in initialization
ieee1394: ohci1394: pass error codes from request_irq through
ieee1394: ohci1394: don't leave interrupts enabled during suspend/resume
ieee1394: mark all hpsb_address_ops instances as const
ieee1394: replace a GFP_ATOMIC by GFP_KERNEL allocation
Linus Torvalds [Wed, 7 Jan 2009 20:00:25 +0000 (12:00 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (171 commits)
Blackfin arch: fix bug - BF527 0.2 silicon has different CPUID (DSPID) value
Blackfin arch: Enlarge flash partition for kenel for bf533/bf537 boards
Blackfin arch: fix bug: kernel crash when enable SDIO host driver
Blackfin arch: Print FP at level KERN_NOTICE
Blackfin arch: drop ad73311 test code
Blackfin arch: update board default configs
Blackfin arch: Set PB4 as the default irq for bf548 board v1.4+.
Blackfin arch: fix typo in early printk bit size processing
Blackfin arch: enable reprogram cclk and sclk for bf518f-ezbrd
Blackfin arch: add SDIO host driver platform data
Blackfin arch: fix bug - kernel stops at initial console
Blackfin arch: fix bug - kernel crash after config IP for ethernet port
Blackfin arch: add sdh support for bf518f-ezbrd
Blackfin arch: fix bug - kernel detects BF532 incorrectly
Blackfin arch: add () to avoid warnings from gcc
Blackfin arch: change HWTRACE Kconfig and set it on default
Blackfin arch: Clean oprofile build path for blackfin
Blackfin arch: remove hardware PM code, oprofile not use it
Blackfin arch: rewrite get_sclk()/get_vco()
Blackfin arch: cleanup and unify the ins functions
...
Linus Torvalds [Wed, 7 Jan 2009 19:59:51 +0000 (11:59 -0800)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (29 commits)
hwmon: Fix various typos
hwmon: Check for ACPI resource conflicts
hwmon: (lm70) Add TI TMP121 support
hwmon: (lm70) Code streamlining and cleanup
hwmon: Deprecate the fscher and fscpos drivers
hwmon: (fschmd) Add watchdog support
hwmon: (fschmd) Cleanups for watchdog support
hwmon: (i5k_amb) Load automatically on all 5000/5400 chipsets
hwmon: (it87) Add support for the ITE IT8720F
hwmon: Don't overuse I2C_CLIENT_MODULE_PARM
hwmon: Add LTC4245 driver
hwmon: (f71882fg) Fix fan_to/from_reg prototypes
hwmon: (f71882fg) Printout fan modes
hwmon: (f71882fg) Add documentation
hwmon: (f71882fg) Fix auto_channels_temp temp numbering with f8000
hwmon: (f71882fg) Add missing pwm3 attr for f71862fg
hwmon: (f71882fg) Add F8000 support
hwmon: (f71882fg) Remove the fan_mode module option
hwmon: (f71882fg) Separate max and crit alarm and beep
hwmon: (f71882fg) Check for hwmon powerdown state
...
Linus Torvalds [Wed, 7 Jan 2009 19:59:27 +0000 (11:59 -0800)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c: Use snprintf to set adapter names
Input: apanel - convert to new i2c binding
i2c: Drop I2C_CLASS_CAM_DIGITAL
i2c: Drop I2C_CLASS_CAM_ANALOG and I2C_CLASS_SOUND
i2c: Drop I2C_CLASS_ALL
i2c: Get rid of remaining bus_id access
i2c: Replace bus_id with dev_name(), dev_set_name()
* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
avr32: Move syscalls.h under arch/avr32/include/asm/
avr32: Define DIE_OOPS
avr32: Remove DMATEST from defconfigs
arch/avr32: Eliminate NULL test and memset after alloc_bootmem
avr32: data param to at32_add_device_mci() must be non-NULL
atmel-mci: move atmel-mci.h file to include/linux
avr32: Hammerhead board support
avr32: Allow reserving multiple pins at once
favr-32: Remove deprecated call
MIMC200: Remove deprecated call
avr: struct device - replace bus_id with dev_name(), dev_set_name()
avr32: Introducing asm/syscalls.h
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
GFS2: Fix typo in gfs_page_mkwrite()
GFS2: LSF and LBD are now one and the same
GFS2: Set GFP_NOFS when allocating page on write
* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
xtensa: Update platform files to reflect new location of the header files.
xtensa: switch to packed struct unaligned access implementation
xtensa: Add xt2000 support files.
xtensa: move headers files to arch/xtensa/include
xtensa: use the new byteorder headers
disable_nonboot_cpus calls _cpu_down. But _cpu_down requires that the
caller already created the stop_machine workqueue (like cpu_down does).
Otherwise a call to stop_machine will lead to accesses to random memory
regions.
When introducing this new interface (9ea09af3bd3090e8349ca2899ca2011bd94cda85
"stop_machine: introduce stop_machine_create/destroy") I missed the second
call site of _cpu_down.
So add the missing stop_machine_create/destroy calls to disable_nonboot_cpus
as well.
Linus Torvalds [Wed, 7 Jan 2009 19:31:52 +0000 (11:31 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
trivial: chack -> check typo fix in main Makefile
trivial: Add a space (and a comma) to a printk in 8250 driver
trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx
trivial: Fix misspelling of "firmware" in powerpc Makefile
trivial: Fix misspelling of "firmware" in usb.c
trivial: Fix misspelling of "firmware" in qla1280.c
trivial: Fix misspelling of "firmware" in a100u2w.c
trivial: Fix misspelling of "firmware" in megaraid.c
trivial: Fix misspelling of "firmware" in ql4_mbx.c
trivial: Fix misspelling of "firmware" in acpi_memhotplug.c
trivial: Fix misspelling of "firmware" in ipw2100.c
trivial: Fix misspelling of "firmware" in atmel.c
trivial: Fix misspelled firmware in Kconfig
trivial: fix an -> a typos in documentation and comments
trivial: fix then -> than typos in comments and documentation
trivial: update Jesper Juhl CREDITS entry with new email
trivial: fix singal -> signal typo
trivial: Fix incorrect use of "loose" in event.c
trivial: printk: fix indentation of new_text_line declaration
trivial: rtc-stk17ta8: fix sparse warning
...
Jiri Kosina [Wed, 7 Jan 2009 12:25:36 +0000 (13:25 +0100)]
HID: fix hid->hiddev initialization in hiddev_connect()
Commit 079034073fa ("HID: hiddev cleanup -- handle all error conditions
properly") by mistake removed proper initialization of hid->hiddev pointer
in hiddev_connect() in case usb_register_dev() succeeds for the hiddev node.
Put it properly back in place.
Reported-and-tested-by: Gabriel C <nix.or.die@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>