lkml.org 
[lkml]   [2012]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/2] sysvshm: SHM_LOCK use lru_add_drain_all_async()
    Date
    From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

    shmctl also don't need synchrounous pagevec drain. This patch replace it with
    lru_add_drain_all_async().

    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    ---
    ipc/shm.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/ipc/shm.c b/ipc/shm.c
    index 02ecf2c..1eb25f0 100644
    --- a/ipc/shm.c
    +++ b/ipc/shm.c
    @@ -872,8 +872,6 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
    {
    struct file *uninitialized_var(shm_file);

    - lru_add_drain_all(); /* drain pagevecs to lru lists */
    -
    shp = shm_lock_check(ns, shmid);
    if (IS_ERR(shp)) {
    err = PTR_ERR(shp);
    @@ -911,6 +909,8 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
    shp->mlock_user = NULL;
    }
    shm_unlock(shp);
    + /* prevent user visible mismatch of unevictable accounting */
    + lru_add_drain_all_async();
    goto out;
    }
    case IPC_RMID:
    --
    1.7.1


    \
     
     \ /
      Last update: 2012-01-01 08:33    [W:2.527 / U:0.956 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site