Re: [PATCH v6 10/12] mmap locking API: rename mmap_sem to mmap_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have build error about kernel/sys.c,


kernel/sys.c: In function ‘prctl_set_vma’:

kernel/sys.c:2392:18: error:

‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean

‘mmap_base’?

  2392 |  down_write(&mm->mmap_sem);

       |                  ^~~~~~~~

       |                  mmap_base

kernel/sys.c:2402:16: error:

‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean

‘mmap_base’?

  2402 |  up_write(&mm->mmap_sem);

       |                ^~~~~~~~

       |                mmap_base



why not rename kernel/sys.c mmap_sem to mmap_lock?


diff --git a/kernel/sys.c b/kernel/sys.c

index 113955fe1c6b..043c04a745a9 100644

--- a/kernel/sys.c

+++ b/kernel/sys.c

@@ -2389,7 +2389,7 @@ static int prctl_set_vma(unsigned long opt,
unsigned long start,

      if (end == start)

          return 0;

-    down_write(&mm->mmap_sem);

+    down_write(&mm->mmap_lock);

      switch (opt) {

      case PR_SET_VMA_ANON_NAME:

@@ -2399,7 +2399,7 @@ static int prctl_set_vma(unsigned long opt,
unsigned long start,

          error = -EINVAL;

      }

-    up_write(&mm->mmap_sem);

+    up_write(&mm->mmap_lock);

      return error;

  }





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux