Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp276399ybk; Tue, 19 May 2020 22:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsBvxgRcPY2M1ARD0jkg+xj2ITvS+/IsvfWUlAtu32UfciGS+lzeUxuKUXJERqXaQUPCzj X-Received: by 2002:a05:6402:2211:: with SMTP id cq17mr1757917edb.171.1589952784860; Tue, 19 May 2020 22:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589952784; cv=none; d=google.com; s=arc-20160816; b=Po7YRe295y0lTE8tuxadupMl6iitlaq2reDNKcy8c5uiZHBYz5VOsa6H/iKJf3Rymq yyoirt4vBOyKJTKEvOiPrz939kUKVr7DQVgRVrwV5ojKlFl2tWDTYi3En910cTZCJeyV gjp+2IYCapqJBw57PYgghIm2ne3l9wo/hrPFiVquBoYL81chS+x43MVFBE8snbkP7t9x WnMFy0FeZHBmF3DcqZpFeUZPNPB1Fu4Fb5sHCV50pVRibG1EGmA1Ph8Dca+oafEMqvJ0 qeTGYe7X0dbuzAck/YojI0NkpkhvGLblKvOH6Ek47dfHYITl7csHbx3qVtwMAugA/Hik u73g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=gLHH8qp+cYXwW8jRyKSlJBqB5UMPqJrCDS4qFPCf+dg=; b=0yYT8ell2NAlKd3TETR6IaHT4z2K/w8x9PvLO/Sgs6QxsFPEIiMv8F0Bcph6axVUd7 BAleGprEUrKI2fULJpZyO9finB0Jbeg7a5npSM9vZigaNFaZIsJWHh1drqtPU64MOrtv kbZMiDFhBswGUu/tJe8T4Em5SiLROcfzVqvK1uIILQoB7dws0wTo9pNvqr1hVkCs2U1N u5yAIIIKkst4LdrhfW5xud4sHFBM/tqmrPb3S1kMh8hqWK9pkmAg0Yzqirr2jjHFUa/Y /do1xBSVCcEUcayO2Zr9AQrniiwNyxwDk3cCb+hfJRdaZLja3fYlCEXiU6L+hfZy4ihS YGLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SSxMo2AJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si971184edf.140.2020.05.19.22.32.42; Tue, 19 May 2020 22:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SSxMo2AJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726838AbgETF3V (ORCPT + 99 others); Wed, 20 May 2020 01:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbgETF3T (ORCPT ); Wed, 20 May 2020 01:29:19 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE0DC061A0E for ; Tue, 19 May 2020 22:29:18 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id y7so797578ybj.15 for ; Tue, 19 May 2020 22:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=gLHH8qp+cYXwW8jRyKSlJBqB5UMPqJrCDS4qFPCf+dg=; b=SSxMo2AJhnlfSf/ZvXnACSRetnbCwbiy1h4mF2wsrAxplpgt5TkT//aTBy2576EFtq Zx7hUhmePluZ5nS0TRCdVfnxXvmxjyLWOBWQM6IEmLP5IUlhae/4qLPSqpArS1KEOPH9 7XtZUaEJXeRjX5B3n/lZfVgQR5PcYh9vdt2LbJkrbNQJGAwv5stEsS7a/A+LYAqwj+7J XjtxtkHLzILSLzgkfHw8rBd0/PDA1cHkzl0ZGzHlOuGWbMbIwn5GxrCLX9YWB3kvtCCT AUG9GLFti5TxfiYW/pRAKGK1UfFT4aPxmzifKbr1/OYpyKbaQ9FIciF+2A0zXFDyYIZ4 AUxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=gLHH8qp+cYXwW8jRyKSlJBqB5UMPqJrCDS4qFPCf+dg=; b=RBM57yRku8RwP35DKCNSfLl2uJwe0yynftBdJqiNKv19U0jwHAZ9VnOD3i2MKNdMY3 oA+WgVzaHxKeXLG2UwNLdkcP1qfjDPWsqZz95RfGJ6rU4HseBVaSx80bljgu1el52C9S BwNt4aXmH2rPMPxWjkWQqDYCueF8k/6XpJs3dz6bzmfGhYDl7v0EnUxRTgj2CzsskYs2 xN8h8Hdg70QDPwZ+hl224efR39NEfDeQ/Qc+hsoLOWxP5VKeebaI7VVJoxJmN6jSo/Ls OFsUoD38nmkLLAYunRk/oQSpM8UicfLS6Nlv4yw9D6Lv0G63E88JEj6p5gN8p0Zodf/v zGPw== X-Gm-Message-State: AOAM5314/us5dYOF9B/Ui/zqoV4YHnPSfETtcHh427aAhe4+MRhIboYD lx9TSq59NG1y7QNzaDZGr60ezl7efNw= X-Received: by 2002:a25:dad5:: with SMTP id n204mr4778038ybf.164.1589952558050; Tue, 19 May 2020 22:29:18 -0700 (PDT) Date: Tue, 19 May 2020 22:28:59 -0700 In-Reply-To: <20200520052908.204642-1-walken@google.com> Message-Id: <20200520052908.204642-4-walken@google.com> Mime-Version: 1.0 References: <20200520052908.204642-1-walken@google.com> X-Mailer: git-send-email 2.26.2.761.g0e0b3e54be-goog Subject: [PATCH v6 03/12] DMA reservations: use the new mmap locking API From: Michel Lespinasse To: Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan , John Hubbard , Michel Lespinasse Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This use is converted manually ahead of the next patch in the series, as it requires including a new header which the automated conversion would miss. Signed-off-by: Michel Lespinasse Reviewed-by: Daniel Jordan Reviewed-by: Laurent Dufour Reviewed-by: Vlastimil Babka --- drivers/dma-buf/dma-resv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 4264e64788c4..b45f8514dc82 100644 --- a/drivers/dma-buf/dma-resv.c +++ b/drivers/dma-buf/dma-resv.c @@ -34,6 +34,7 @@ #include #include +#include #include /** @@ -109,7 +110,7 @@ static int __init dma_resv_lockdep(void) dma_resv_init(&obj); - down_read(&mm->mmap_sem); + mmap_read_lock(mm); ww_acquire_init(&ctx, &reservation_ww_class); ret = dma_resv_lock(&obj, &ctx); if (ret == -EDEADLK) @@ -118,7 +119,7 @@ static int __init dma_resv_lockdep(void) fs_reclaim_release(GFP_KERNEL); ww_mutex_unlock(&obj.lock); ww_acquire_fini(&ctx); - up_read(&mm->mmap_sem); + mmap_read_unlock(mm); mmput(mm); -- 2.26.2.761.g0e0b3e54be-goog