Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp264019ybm; Tue, 26 May 2020 16:21:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUBmqVxipWqoI50oCQQKM03/hbwfjFpzf7WErRLzPQ5q1eZCtaPNgzl+FclC8bGGn4EFi4 X-Received: by 2002:a17:906:5681:: with SMTP id am1mr3325397ejc.376.1590535285844; Tue, 26 May 2020 16:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590535285; cv=none; d=google.com; s=arc-20160816; b=ASAkLV5lbOY+MqIqAKnTWS24A/HWth5XD93aXQdmZzNr63+zaKBJFOOCUMfVaTYhgw IVJ34i7Ak9q9BhunmHBVGxvMmihEP2A8VfUK0jf74V3T82N1lT9exXG9FxHAC8z60pAQ ERNzq+4hVslLR94mNCmyhelIBEtMnng153ekG9QUneJFqXzj+TNS4mKRtfEihLc0LHRL SrhiXCMHWPn0vMSHX87ruzXCMj8A1FRdWpVXWXcAQX7B4mMXvjIoHPLuI0U5g31Q5IMd oCRGCPf+mlF/rQBcYK1WOpYdpuIgxEKaQxIw5Qb4y7HS0LsQ0U9LtD2eaxeVX+6Vyu1y wQrw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TvoN8a3WZmoogVlnFEo2G3/jPQNtfJ5pQXb6VgaLeNI=; b=lZ5Khu6P0GPdHGWEzzoz9S3BJ618BmxoRRq4uNJiWmv4kxlAz7ndFwyityrGlMjgmb OBI1hPTwYQLMY2aLB1FeM1KepLhpt2oSV34fetsrWskFmyMREVF49f7yYjhbpht7qHQt Q0F7/zkOb9yHjgAuLi0DdOuC0eKN889Jeb/P/lRzEXkV6xHeMaxy7KS2w8ybL9W/TKIc m7qxKrkLHEJ4E5izq2c2dmMsucBdqOay9OmqpLV51fPUgs/9egaPkdhPNqAp7TkhYq92 fEpsX2Ox+bozJOSM38rh/20D5M0QblQc/aJNgPqhBbx6ILz8XsEvW6ouoj1jm4wDH27j XFEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=EEzkohF3; 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 sd5si758878ejb.194.2020.05.26.16.21.02; Tue, 26 May 2020 16:21:25 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=EEzkohF3; 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 S2390226AbgEZTvb (ORCPT + 99 others); Tue, 26 May 2020 15:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389942AbgEZTv3 (ORCPT ); Tue, 26 May 2020 15:51:29 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FF58C03E96E for ; Tue, 26 May 2020 12:51:29 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t16so9105440plo.7 for ; Tue, 26 May 2020 12:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TvoN8a3WZmoogVlnFEo2G3/jPQNtfJ5pQXb6VgaLeNI=; b=EEzkohF3SUyIeVc607D1E79iz7OYkD/uy0I4GSnchfP+t2/8/jBtqFox0ipMXW7gmS ofFyzP3GFe0yYbASDLZaxrNNYrAZioS6+qyZzi3BNWoxV7sx7HqmGaPk0jbEdJvgnKeB LS9UwziDdS5h+5MFwXcOepQDNcjfOPRuuNqKL+56cp6TcQw3V1rzfELuJiMDiQxFYBUv vodgm8HTVNcfKt1cQ9mCuLi6iS5R/Q8g3QwtsGY6bO7P1eejUGE4Bg2SUpBDQd14zfM1 K3pATJ3oH3ooIkQY7kB2SG6VI0b8+IfGy1HVnsFn7Li+LHrtGMCLBa+H3phkx45yiFvC NeTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TvoN8a3WZmoogVlnFEo2G3/jPQNtfJ5pQXb6VgaLeNI=; b=tipX9/wqF+9Uzm5bXOhKWHHfQ6WABlnGYTlVJSTpIl+k7NxClk4s7K/qd2YageYEQN lcs5JesdflwtHVKZkrAH3cd0tjbwVKQ1yqAejAnjf9ZQoI3994odIUkkPeyjl+JtAGOs uVKuy9tV+JOO/jQOnoIKSgrTyEcYS5460Zaklgt5sK87R+D1iBAkpJOivpyQl+RHc6g6 5lKAgo8zeVYmkG2E9DI4yymOptKCLgBmSjNIdINY6BUac2YJT9bcY1HYQ/xXe04vi/Yv w+QNWj5QEH9gXUz6WsxAcR4qHs51SHmj0qSLFlBJI0xhfqK7wk+2o4tqKxpMVQBhdZ2X 5dLA== X-Gm-Message-State: AOAM5319gR0vpZODK2dN55eboZAdGxnNihunihL2bLCqpJ2th8LU5IFF o7A6UnSANAmWoC0pMl681qp/qw== X-Received: by 2002:a17:90a:1b25:: with SMTP id q34mr920742pjq.12.1590522688801; Tue, 26 May 2020 12:51:28 -0700 (PDT) Received: from x1.lan ([2605:e000:100e:8c61:94bb:59d2:caf6:70e1]) by smtp.gmail.com with ESMTPSA id c184sm313943pfc.57.2020.05.26.12.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 12:51:28 -0700 (PDT) From: Jens Axboe To: io-uring@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, Jens Axboe Subject: [PATCH 02/12] mm: allow read-ahead with IOCB_NOWAIT set Date: Tue, 26 May 2020 13:51:13 -0600 Message-Id: <20200526195123.29053-3-axboe@kernel.dk> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526195123.29053-1-axboe@kernel.dk> References: <20200526195123.29053-1-axboe@kernel.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The read-ahead shouldn't block, so allow it to be done even if IOCB_NOWAIT is set in the kiocb. Signed-off-by: Jens Axboe --- mm/filemap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 23a051a7ef0f..80747f1377d5 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2031,8 +2031,6 @@ static ssize_t generic_file_buffered_read(struct kiocb *iocb, page = find_get_page(mapping, index); if (!page) { - if (iocb->ki_flags & IOCB_NOWAIT) - goto would_block; page_cache_sync_readahead(mapping, ra, filp, index, last_index - index); -- 2.26.2