> --- linux-2.6.26-rt1.orig/fs/namespace.c 2008-07-30 22:39:30.000000000
> +0530 +++ linux-2.6.26-rt1/fs/namespace.c 2008-07-30 22:39:36.000000000
> +0530 @@ -178,13 +178,13 @@
> unsigned long count;
> struct vfsmount *mnt;
> } ____cacheline_aligned_in_smp;
> -static DEFINE_PER_CPU(struct mnt_writer, mnt_writers);
> +static DEFINE_PER_CPU_LOCKED(struct mnt_writer, mnt_writers);
>
> static int __init init_mnt_writers(void)
> {
> int cpu;
> for_each_possible_cpu(cpu) {
> - struct mnt_writer *writer =3D &per_cpu(mnt_writers, cpu);
> + struct mnt_writer *writer =3D &per_cpu_var_locked(mnt_writers, cpu);
> spin_lock_init(&writer->lock);
> lockdep_set_class(&writer->lock, &writer->lock_class);
> writer->count =3D 0;
> @@ -199,7 +199,7 @@
> struct mnt_writer *cpu_writer;
>
> for_each_possible_cpu(cpu) {
> - cpu_writer =3D &per_cpu(mnt_writers, cpu);
> + cpu_writer =3D &per_cpu_var_locked(mnt_writers, cpu);
> spin_unlock(&cpu_writer->lock);
> }
> }
> @@ -251,8 +251,8 @@
> {
> int ret =3D 0;
> struct mnt_writer *cpu_writer;
> -
> - cpu_writer =3D &get_cpu_var(mnt_writers);
> + int cpu =3D 0;
> + cpu_writer =3D &get_cpu_var_locked(mnt_writers, &cpu);
> spin_lock(&cpu_writer->lock);
> if (__mnt_is_readonly(mnt)) {
> ret =3D -EROFS;
> @@ -262,7 +262,7 @@
> cpu_writer->count++;
> out:
> spin_unlock(&cpu_writer->lock);
> - put_cpu_var(mnt_writers);
> + put_cpu_var_locked(mnt_writers, cpu);
> return ret;
> }
> EXPORT_SYMBOL_GPL(mnt_want_write);
> @@ -273,7 +273,7 @@
> struct mnt_writer *cpu_writer;
>
> for_each_possible_cpu(cpu) {
> - cpu_writer =3D &per_cpu(mnt_writers, cpu);
> + cpu_writer =3D &per_cpu_var_locked(mnt_writers, cpu);
> spin_lock(&cpu_writer->lock);
> __clear_mnt_count(cpu_writer);
> cpu_writer->mnt =3D NULL;
> @@ -332,8 +332,8 @@
> {
> int must_check_underflow =3D 0;
> struct mnt_writer *cpu_writer;
> -
> - cpu_writer =3D &get_cpu_var(mnt_writers);
> + int cpu =3D 0;
> + cpu_writer =3D &get_cpu_var_locked(mnt_writers, &cpu);
> spin_lock(&cpu_writer->lock);
>
> use_cpu_writer_for_mount(cpu_writer, mnt);
> @@ -360,7 +360,7 @@
> * __mnt_writers can underflow. Without it,
> * we could theoretically wrap __mnt_writers.
> */
> - put_cpu_var(mnt_writers);
> + put_cpu_var_locked(mnt_writers, cpu);
> }
> EXPORT_SYMBOL_GPL(mnt_drop_write);
>
> @@ -612,7 +612,7 @@
> * can come in.
> */
> for_each_possible_cpu(cpu) {
> - struct mnt_writer *cpu_writer =3D &per_cpu(mnt_writers, cpu);
> + struct mnt_writer *cpu_writer =3D &per_cpu_var_locked(mnt_writers,
> cpu); if (cpu_writer->mnt !=3D mnt)
> continue;
> spin_lock(&cpu_writer->lock);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-rt-users" in the body of a message to
majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html