Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2574111ybk; Mon, 18 May 2020 02:32:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd9S5PmEXPRbVZAgFGYuHnp7NjscuSP87G9MtmAnj8FKiN0u5yZ2/1ZcFFeyfFdnKwbQPY X-Received: by 2002:a17:906:f885:: with SMTP id lg5mr2011960ejb.327.1589794342053; Mon, 18 May 2020 02:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589794342; cv=none; d=google.com; s=arc-20160816; b=BDUPj1/7afgwtmTWLNTHGDGCCeecwfxNTRpZOa87BuHHLHZKGKZSi0QkZN3EhM24DY tWh83x3ieir53NWvhxFtIwnhB5geaau+Cz6+4YtZ78r3Hevq84s6/NNzccAWpSfpmhby GM2jjFbclgNx1zh8xUlGL+jDe1/FFsdhEAnqoWJLF7CMHjXSRtcqPxqECg+7wM3BhNQn Ltdjc7TuBn5CU6hQOVUfuMRprICyryJagk2rKwRxsDO6OdGK9JOhMJd0hZ8Svg3+g2ES DW6zGdiQpKESif+SeTd0E81eyvc4e7Pi8ohfnYlG4FxWoUzZoHxTg/KwuFXeVjPwgF5y bb+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=nimX5OFLGcEJ9WH3f8Ov02dFD/aCuzQomnAvDixUnkc=; b=iHaRn48Qf897gzb2BSwP2JGwtVtnUOS3C0VM5ncrFSg2x2Fljvi7+4UX1ggm2d+MHl 3ZB1tMJY3/YFJGqSg7zkn4Y4RZFrFZ3ioVxCQEpOmLx11lvBSwla4i5ciI3RgQ6ZBtaH B1JkWtWxPA50M/VRHbOaaiKIpGyjlEdib6yfg+lqc188M4vm9m+G/XpR9rp9vj97c897 T+NHmzO2p3SG1TRLhRz3g5t1y34WiIEdTq5T0+82L5WZ+kQLu2uyhxahXFlkQi36Tvna DKxo8HmpJ0NNXFkP+GI2tEtZQ5s33VxIgnMOHVN0thblbLwIpoJhGVjc9YHuiCpQwZ5o 9oCA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si3309767eji.493.2020.05.18.02.31.58; Mon, 18 May 2020 02:32:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbgERJaC (ORCPT + 99 others); Mon, 18 May 2020 05:30:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:44758 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgERJaC (ORCPT ); Mon, 18 May 2020 05:30:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 89C39AF57; Mon, 18 May 2020 09:30:03 +0000 (UTC) Subject: Re: [PATCH v5 03/10] DMA reservations: use the new mmap locking API To: Michel Lespinasse , Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-4-walken@google.com> From: Vlastimil Babka Message-ID: <89b3eddb-76c3-ca00-b49b-3f9d4076cd07@suse.cz> Date: Mon, 18 May 2020 11:30:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200422001422.232330-4-walken@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/20 2:14 AM, Michel Lespinasse wrote: > 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: 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); > >