[CRIU] [PATCH 05/28] shmem: Remove pid argument of shmem_wait_and_open()
Andrei Vagin
avagin at virtuozzo.com
Tue Jun 6 20:56:37 MSK 2017
Applied
On Mon, Jun 05, 2017 at 08:24:09PM +0300, Kirill Tkhai wrote:
> It's unused and it's rewritten in shmem_wait_and_open(),
> and it just confuses a reader. So, kill it.
>
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ---
> criu/shmem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/criu/shmem.c b/criu/shmem.c
> index a55f34675..fbfba0060 100644
> --- a/criu/shmem.c
> +++ b/criu/shmem.c
> @@ -439,10 +439,10 @@ int collect_shmem(int pid, struct vma_area *vma)
> return 0;
> }
>
> -static int shmem_wait_and_open(int pid, struct shmem_info *si, VmaEntry *vi)
> +static int shmem_wait_and_open(struct shmem_info *si, VmaEntry *vi)
> {
> char path[128];
> - int ret;
> + int pid, ret;
>
> pr_info("Waiting for the %lx shmem to appear\n", si->shmid);
> futex_wait_while(&si->lock, 0);
> @@ -519,7 +519,7 @@ static int open_shmem(int pid, struct vma_area *vma)
> BUG_ON(si->pid == SYSVIPC_SHMEM_PID);
>
> if (si->pid != pid)
> - return shmem_wait_and_open(pid, si, vi);
> + return shmem_wait_and_open(si, vi);
>
> if (si->fd != -1) {
> f = dup(si->fd);
>
More information about the CRIU
mailing list