From patchwork Tue Mar 14 15:42:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 13174673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2480C7618A for ; Tue, 14 Mar 2023 15:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjCNPng (ORCPT ); Tue, 14 Mar 2023 11:43:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjCNPnd (ORCPT ); Tue, 14 Mar 2023 11:43:33 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8503FA0B2A for ; Tue, 14 Mar 2023 08:42:54 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id o14so1030640ioa.3 for ; Tue, 14 Mar 2023 08:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; t=1678808531; x=1681400531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZHz2nZLJ4+lOFDzcTjzzzwSr1D9I38tSW7UFA8xP/Wc=; b=iViwvskyUrD//4VJS4EeDiJQJ9+jLVfuS3UhjpR6NN4jYjmy5SnVln807bJL41/L9H ig7FPnvJfEC5Ax0q72Ynsq3b+XGieUKQ0sHtUF/YR8BMQu6wzRMFcPWxX3BJ3jXXt3zo YplZGA+P/iff7aZfIPQHHFv8P8juSPLAvqcXkW2NAOVOj27gQ8GbJoHIrb89mjxX/pSx xfS3gpLDhOMQHYhmeH/L1/rdVt5NeIka91iZomNgoxEahN4YvBWJPxfWhivVmo9hIeGV N/hSJMh9iBRfPT7BedXGhdhbWc5oXGi1Sz/+k/LNPHjYeDEmuYuvH2HozT5B4CN8h83x CO5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678808531; x=1681400531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZHz2nZLJ4+lOFDzcTjzzzwSr1D9I38tSW7UFA8xP/Wc=; b=Im/pSfodpWC7KK8D34INWsNDwASEo/TddPyoRHGCyJtAUcihjMRCCTaexQJXYBFJuN lHHURXC00LJayGUMDcSyeUPIzWExGYGYrJwQ7V6HZGqpyydvOVEKpb/+YFOfqAEFLPHD RRAedMpQQkPBXtfKc2ZwoDxPwE++K7PbCVfz2xTAmtqPQB2VK5VjFRz/ow+0Lsoh0Jx9 CZUqJGNRjGmhCdGNky31iFPY4Mdh+iHC0nmrAzhLTFc1hVfIH6Bc0fXPTeqz3WpB6ajT j4ppnGynGmN9vcUbEnGRUeWBPoXGKuAYWJteV2oc074nI6AMzFKPmsur+tXnDVYDH0Y9 9BAA== X-Gm-Message-State: AO0yUKU37RZlVg0elL1iNceDDx/QzF5xG19AuS0Su10MK8iq4Ruukjar 7JBL+ONBGs9PBDB6ET5BoCw8bY5oQtI6DBplPcRKGA== X-Google-Smtp-Source: AK7set8g0uVZ/TbXbVx1cBaqfSdKLbgSZ8iRV9KZ/U2mVbIm19U5+LVCfYmZY9YcN8rUxjj93Z9RoQ== X-Received: by 2002:a6b:6e08:0:b0:74e:8718:a174 with SMTP id d8-20020a6b6e08000000b0074e8718a174mr13396ioh.1.1678808531079; Tue, 14 Mar 2023 08:42:11 -0700 (PDT) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id u9-20020a02cb89000000b003b0692eb199sm867929jap.20.2023.03.14.08.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 08:42:10 -0700 (PDT) From: Jens Axboe To: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: brauner@kernel.org, Jens Axboe , Dave Chinner Subject: [PATCH 3/3] pipe: set FMODE_NOWAIT on pipes Date: Tue, 14 Mar 2023 09:42:03 -0600 Message-Id: <20230314154203.181070-4-axboe@kernel.dk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314154203.181070-1-axboe@kernel.dk> References: <20230314154203.181070-1-axboe@kernel.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org The read/write path is now prepared to deal with IOCB_NOWAIT, hence enable support for that via setting FMODE_NOWAIT on new pipes. Acked-by: Dave Chinner Reviewed-by: Christian Brauner Signed-off-by: Jens Axboe --- fs/pipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/pipe.c b/fs/pipe.c index dc00b20e56c8..b7e380952fca 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -999,6 +999,9 @@ static int __do_pipe_flags(int *fd, struct file **files, int flags) audit_fd_pair(fdr, fdw); fd[0] = fdr; fd[1] = fdw; + /* pipe groks IOCB_NOWAIT */ + files[0]->f_mode |= FMODE_NOWAIT; + files[1]->f_mode |= FMODE_NOWAIT; return 0; err_fdr: