Merge branch 'linus' into sched/urgent, to resolve conflicts
[sfrench/cifs-2.6.git] / include / linux / sched / mm.h
index 03a169087a18d7a99afacc988ba569b4ad1a2764..1149533aa2fa2838d28b4351522314cb302bc0a4 100644 (file)
@@ -12,7 +12,7 @@
 /*
  * Routines for handling mm_structs
  */
-extern struct mm_struct * mm_alloc(void);
+extern struct mm_struct *mm_alloc(void);
 
 /**
  * mmgrab() - Pin a &struct mm_struct.
@@ -36,32 +36,7 @@ static inline void mmgrab(struct mm_struct *mm)
        atomic_inc(&mm->mm_count);
 }
 
-/* mmdrop drops the mm and the page tables */
-extern void __mmdrop(struct mm_struct *);
-static inline void mmdrop(struct mm_struct *mm)
-{
-       /*
-        * The implicit full barrier implied by atomic_dec_and_test() is
-        * required by the membarrier system call before returning to
-        * user-space, after storing to rq->curr.
-        */
-       if (unlikely(atomic_dec_and_test(&mm->mm_count)))
-               __mmdrop(mm);
-}
-
-static inline void mmdrop_async_fn(struct work_struct *work)
-{
-       struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work);
-       __mmdrop(mm);
-}
-
-static inline void mmdrop_async(struct mm_struct *mm)
-{
-       if (unlikely(atomic_dec_and_test(&mm->mm_count))) {
-               INIT_WORK(&mm->async_put_work, mmdrop_async_fn);
-               schedule_work(&mm->async_put_work);
-       }
-}
+extern void mmdrop(struct mm_struct *mm);
 
 /**
  * mmget() - Pin the address space associated with a &struct mm_struct.