Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1521635rdb; Wed, 24 Jan 2024 19:49:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1loft1haG8ApEW4IPld8Eu6p6l0S/q2mdfL4nzO9qnxsGf2uoJBYLvTREPcvxzzLfOfqS X-Received: by 2002:a81:4512:0:b0:5ee:7a7d:fd11 with SMTP id s18-20020a814512000000b005ee7a7dfd11mr183103ywa.21.1706154590641; Wed, 24 Jan 2024 19:49:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706154590; cv=pass; d=google.com; s=arc-20160816; b=TYjveb41Fb2r0/eSmBjNekCwe4nk+h1p0w46KkyMxUXTFUdbrq9E8NRwZXCZCPAojR o1ZD02zW0gkZUYHCnJXQ9xImB0zFdwZ59dEd8hPhU52HXa5kqScVAS5ddd6Z/nsSySUG l5nD+kbty6nLuHOQ+XXQsK0kqF2zVB8zKDakliz4Npo8rkvRScivqstIC++q4vC4MfsR 6fDSd5fRNqJRxNWcXimkiC3yZjz7uD70gB8LC+OSCOY+WSxhFf4tOJg7d2GrpCi49nnq pvIx4Zty9wnmYkqq+zAUeVgytfywl8LUEGIOzEy/1KTxauTuPrpdc2MRaNJYo/Uxewry nBpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=17qKi75qGgjXysBew06HKVO12vWbye98Ka2AcoY+EoY=; fh=DK6aj2bwtzLHLwtNGHpxLhefcc6QrCP7kxmDTjdZAkE=; b=VuhNZnY2K1ZCwA8pYIg2un8KjdrciU4VZU0wbdrYlDF07aXGc9EUwnXYCdWYOlq6hQ URf6TWf0f/tWoM0WI9EUqZBTUoK8mxgdvxbTGpOYFoIpeokFhAkadxG+Dnsm64k8qJVG 5/8eBdAss/iXe74b5y6XqeZZBH8f69yjJfapi+gEI0z5oHpXNFzd3qSM4xPgR30SNCjC bvhqrN2O1qMWwhe6U+lGSoo8kPeiU9NjTDepx+YkcHtpqByTN/pNXW8utB6QFG9HCLB6 qbIXl9H15yrAW1K6Z96a1KzSsiAr0UrJxalhxkZm97TuxkMDDryF4T2HuZmK35aDwz3W +jkg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VYWh6VeQ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-37934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a16-20020a170902b59000b001d71ef5d315si10633039pls.339.2024.01.24.19.49.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 19:49:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VYWh6VeQ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-37934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 407ED282B73 for ; Thu, 25 Jan 2024 03:49:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76D0479E2; Thu, 25 Jan 2024 03:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VYWh6VeQ" Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADA6C79C1 for ; Thu, 25 Jan 2024 03:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706154582; cv=none; b=pvV4Zzp8wI/q8DdnYWx8GQ4vg0Wc9MQmE4gdFK3vEwWWJ/FlkodFg8o0V2ucMlps+bZlBqtY1vkLq8PjLAA+r2Ruky/srj5c/TYCLErmKkaf8hybdDA/xy7zrgiIhNytalIpv/zS8q0SvoHGpvl1DS79AnuBnihcTBqSBivs3j4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706154582; c=relaxed/simple; bh=pl8wYidjs3UBdnBNyRJi1/KfoDsGumPvUU8mC9VcZzA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ovlyRchcGtO7x07k+aZzM5aKoUm6d6J81Klt5muJ05HV3LTPI8z5FZsDHQUuydUXcxgdrw/t+crJrzjzLM2U7t0VJMbIjh81UlG3w1yUFNhh5avE5qxs73AWkTePgs+aAnlfUfq+g2DMsjBS61jztkqVGNXwM3AirVSCX8g9Djg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=VYWh6VeQ; arc=none smtp.client-ip=95.215.58.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706154578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=17qKi75qGgjXysBew06HKVO12vWbye98Ka2AcoY+EoY=; b=VYWh6VeQ8MOZCclfJT0knJEbPmzHhZmHeCK7VnsMOH0fG28JKZR2pFfOEPiDCYmkj2fTwT mNSn+mZy59niJ9nFT4YJyyt2JEKzF6w2HdStpdD73ZpLSU1w7hh+P04UvxhGDSi5XCDMwI HgWWw0EtfR2odZWnnP6MTkdp00mZARU= From: Yajun Deng To: akpm@linux-foundation.org Cc: Liam.Howlett@Oracle.com, lstoakes@gmail.com, viro@zeniv.linux.org.uk, brauner@kernel.org, vbabka@suse.cz, willy@infradead.org, surenb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yajun Deng Subject: [PATCH v2 0/2] mm/mmap: simplify vma_merge() Date: Thu, 25 Jan 2024 11:49:20 +0800 Message-Id: <20240125034922.1004671-1-yajun.deng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The vma_merge() has too many parameters, we can pass vma to vma_merge(), so that it can save two parameters. Since the src vma was passed, find_vma_intersection() can be removed. v2: split it into two patches. v1: https://lore.kernel.org/all/20240118082312.2801992-1-yajun.deng@linux.dev/ Yajun Deng (2): mm/mmap: pass vma to vma_merge() mm/mmap: remove find_vma_intersection() in vma_merge() mm/mmap.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) -- 2.25.1