lkml.org 
[lkml]   [2009]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [cgroup or VFS ?] WARNING: at fs/namespace.c:636 mntput_no_expire+0xac/0xf2()
> OK...  So here's what we really want:
> * we know that nobody will set cpu_writer->mnt to mnt from now on
> * all changes to that sucker are done under cpu_writer->lock
> * we want the laziest equivalent of
> spin_lock(&cpu_writer->lock);
> if (likely(cpu_writer->mnt != mnt)) {
> spin_unlock(&cpu_writer->lock);
> continue;
> }
> /* do stuff */
> that would make sure we won't miss earlier setting of ->mnt done by another
> CPU.
>

If this is done, I'll be available to test it.

> Anyway, for now (HEAD and all -stable starting with 2.6.26) we want this:
>

And here is my:

Tested-by: Li Zefan <lizf@cn.fujitsu.com>

> --- fs/namespace.c 2009-01-25 21:45:31.000000000 -0500
> +++ fs/namespace.c 2009-02-15 21:31:14.000000000 -0500
> @@ -614,9 +614,11 @@
> */
> for_each_possible_cpu(cpu) {
> struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu);
> - if (cpu_writer->mnt != mnt)
> - continue;
> spin_lock(&cpu_writer->lock);
> + if (cpu_writer->mnt != mnt) {
> + spin_unlock(&cpu_writer->lock);
> + continue;
> + }
> atomic_add(cpu_writer->count, &mnt->__mnt_writers);
> cpu_writer->count = 0;
> /*



\
 
 \ /
  Last update: 2009-02-18 12:23    [W:0.054 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site