ia64/xen-unstable

changeset 5300:56913f1c3e0d

bitkeeper revision 1.1661 (42a03d7dMwgNdNW-UfchOZEUQsYy9w)

Make sure we only look at the unpinned list for mms which are actually
unpinned.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
author sos22@douglas.cl.cam.ac.uk
date Fri Jun 03 11:22:37 2005 +0000 (2005-06-03)
parents 35b69ed1f23b
children 6b7a4f646fef
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c	Fri Jun 03 09:49:28 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c	Fri Jun 03 11:22:37 2005 +0000
     1.3 @@ -134,9 +134,11 @@ void destroy_context(struct mm_struct *m
     1.4  			kfree(mm->context.ldt);
     1.5  		mm->context.size = 0;
     1.6  	}
     1.7 -	spin_lock(&mm_unpinned_lock);
     1.8 -	list_del(&mm->context.unpinned);
     1.9 -	spin_unlock(&mm_unpinned_lock);
    1.10 +	if (!mm->context.pinned) {
    1.11 +		spin_lock(&mm_unpinned_lock);
    1.12 +		list_del(&mm->context.unpinned);
    1.13 +		spin_unlock(&mm_unpinned_lock);
    1.14 +	}
    1.15  }
    1.16  
    1.17  static int read_ldt(void __user * ptr, unsigned long bytecount)