From patchwork Sun Nov 20 03:41:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weizhao Ouyang X-Patchwork-Id: 23378 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp964966wrr; Sat, 19 Nov 2022 19:54:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7mai72wgYqxaGNaXvrbtLlt5uXbeUTu6WKdlaoPo9AG+MQ93q5Yo4njly5gZqFAWpmkexW X-Received: by 2002:a50:ec89:0:b0:462:f136:d143 with SMTP id e9-20020a50ec89000000b00462f136d143mr11366425edr.418.1668916449307; Sat, 19 Nov 2022 19:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668916449; cv=none; d=google.com; s=arc-20160816; b=LcazrR5AnEtnWElLV8SueZGz0+R4UVXksng2DGoHjrKVWemPtO/qm6UvptI7W1fu+j NK5HL/kkz53HEoNBBtlg68kGwtcIWcA2JKpn8ihiU4RZRvdPe/RWzmEpjY+V4CRZEjWV 09r+4goYakpgsUdoTyZ8+XI6DWlHO9XtBNtT12oCBYwD3PnDWT6c4//H8MjF0k/yjbl0 sMmLc9XTkOMdpAxVQqfz1v6aGS0mWQw2QlzCISN0OOA2bY759RWk4H2+qvcBvaTYYr4n BzUr3Nm8bpWWBhVO+Spe3EIXq30jQJu7lnpsTSgx2K30M5zlUOHt/aIWYk4mq1dlY+b9 CM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0Y/8ElskN/imwJr8zX/roKTm/sqDR1NdeLdATGaejC8=; b=AWG8y1zHVs5Eq9eIm4rZfvbvQr8fWp/wybx9QPi40/DmnxY9dlHbNzqx7gQNOFYuQu 9hbbPsTP3IhQbRDdLpKP8XqeALssZwjWgS9KbmSIj4LM9iiIoJOSgrG2aeImzNI70Bar 0GehZWNBG8s4skB1qqAdt4x7ZBnQCI4f6BW8w2r4XCgOG5ZvloIrnXqaZUtlsD5N/Nl5 GVEofjFrrzuVA9rha33sEpbhVShZq83evT+GhoHTxQ1zCDOrb2GzDDci78PE9U3qpGjO 44S5HJ2VplCRCHZMK04cqAp1OLN+uEA6zE1gexE4KOq9CSOlSifk+7FlA8UoZLK1tzvJ FF0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZMrxUweM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a05640240c300b0045d0c00ead2si7357656edb.157.2022.11.19.19.53.44; Sat, 19 Nov 2022 19:54:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZMrxUweM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbiKTDmK (ORCPT + 99 others); Sat, 19 Nov 2022 22:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiKTDmJ (ORCPT ); Sat, 19 Nov 2022 22:42:09 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7F78A8C24; Sat, 19 Nov 2022 19:42:08 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id k5so7734086pjo.5; Sat, 19 Nov 2022 19:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0Y/8ElskN/imwJr8zX/roKTm/sqDR1NdeLdATGaejC8=; b=ZMrxUweMkgRi3Mel/zBZQQQ2CyjuSUJYK+gSbd6SLxddGYxUSlfstmOmr6Mh6f8QMs /JY33CnAVFEfSUiVogv7z0eeKkXNcMIsWr1SXAdsfM1/16ziexVcWp4JTIXDA/4KVO9A pcAjFf2cbKVulJt3scSxz4ZawvvMdeTz6C8sYiMwP4ok9xz9lNAC7eheQxcylxLVFMJh Ugcnmx+QYENGV7jZDfCTOyafOfKpyFrJQDLiWZv+DDq2UncmzZQU4tpxCu5GSICKucBf xUWOcDlI35upyf6wTLmyV0Wkm5a1ROH/Tmjq6MZWiBhZtIQHmwaI+Ge04l/ezQbU4Jqg SJ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Y/8ElskN/imwJr8zX/roKTm/sqDR1NdeLdATGaejC8=; b=Ukbc8FIn7c+eQoDCegc6i+kIMJaXiwGQ9Yw/op+HNicpDSmHqaOuNls+7jqphdvgzD qRFQvxZRQMLiSzNdNJieTTdTGw6EDhpxyLtFIKWSExBj7dWvdvzESNG9NBptLfMWJa+B FTzDQArZrviPhtjZzyszJrpv1/seF4H0cLF90tv82AszINWyZT/u9zNmD5jOYbT48y3a mxYh3G290xeE/aiRnHoogjbRbv/Ft7MpglZtTs2N1RjkabKp/ykq/LfR8TFL5ii175GQ FjV7PrrnT4nqOxgZul7PWqwJ24iw567KDXqxxBwcea6ayIx1RLJG31TMV0e8Bkfn+TjB 7vNw== X-Gm-Message-State: ANoB5pnKGI6Q0V0aH8xtidhghm9aQsMjjyGOWy/nxGf4JtVcwWTy7xVP r6xGKDdBrbD53HzGLlu8ZZc= X-Received: by 2002:a17:903:41c9:b0:185:57b6:13c3 with SMTP id u9-20020a17090341c900b0018557b613c3mr6235211ple.116.1668915728034; Sat, 19 Nov 2022 19:42:08 -0800 (PST) Received: from ownia.localdomain ([2400:9ce0:1358:905d:ef14:1201:cdd8:9210]) by smtp.gmail.com with ESMTPSA id x4-20020a1709029a4400b0018853dd8832sm6579531plv.4.2022.11.19.19.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Nov 2022 19:42:07 -0800 (PST) From: Weizhao Ouyang To: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Weizhao Ouyang Subject: [PATCH] ovl: check IOCB_APPEND flag Date: Sun, 20 Nov 2022 03:41:43 +0000 Message-Id: <20221120034143.684416-1-o451686892@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749985734929480588?= X-GMAIL-MSGID: =?utf-8?q?1749985734929480588?= Add *_APPEND flag for ovl_iocb_to_rwf(). Signed-off-by: Weizhao Ouyang --- fs/overlayfs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index a1a22f58ba18..ed286dd0e719 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -244,6 +244,8 @@ static rwf_t ovl_iocb_to_rwf(int ifl) { rwf_t flags = 0; + if (ifl & IOCB_APPEND) + flags |= RWF_APPEND; if (ifl & IOCB_NOWAIT) flags |= RWF_NOWAIT; if (ifl & IOCB_HIPRI)