Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18237099rwd; Tue, 27 Jun 2023 13:54:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ujQTI5Tu2LAClL5WG+KWl7gHNcKU1uVAHhbey2QZPNRavB0Lf7U+6pSbwatu0utpNNBdT X-Received: by 2002:a05:6a20:748c:b0:11f:39e2:d08c with SMTP id p12-20020a056a20748c00b0011f39e2d08cmr36776268pzd.30.1687899245749; Tue, 27 Jun 2023 13:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687899245; cv=none; d=google.com; s=arc-20160816; b=EQ+sw+2rfXEkVMo6ElmHeiEK1ArWw61xFeHaeppNMXoTVp/96uw7sxuMUNKcB7N/ah wuEqODdHHH6MANuQBkSyZ8TsuU91RQQpfV7mN1i7rfj96H089sGlB+RWGjnnE54p+c4T tazNlvp4kQlJl55G3EcSuA9sbe2ig2dvBgDdUk1mFKAlznKz4bC+tEO+X0QTL57nY7hi fla4iK+0m6MmKeE1D15/HtCUCiWNr64MVt8tvjuucg0HkYmY19PuXhxTzAA/vANkQ1Ff xuwB/NNToPRtbzpIxRA3HwXf75M0phha0h3v94e/R2fSrJLMHdfZcB406uiFLxBUzdBL eLXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=c7zI3Ikn18m+weO0Q9d4yhnigfqyd1iPv7UrHGPbFTU=; fh=EwHFucLs4bwDakTQKl/ndDudi5N9htFCanErUntz+qw=; b=BqV0oXEdKU467gX0Cq3NX9LZ65VIzlwRv1qqpIQu+boLGIcM8FLeTn4ouLkPLw6aej ah03dRC8l+ixVGTJqfNjn7tniZSBPh7M8Rl/p4vqdZ+FhivVjA+3imeJyGaFUkb5c56t q4EwDDZYykd2xK03woBqzWqY+/pvZmk7VKN9TSesKEn5REw34rf9dV7G0JHwOUZgySXl vDcgRD1c0lWPiNZG0d4GiJ4rJMfXfE29OwQDnkcAIeF7qJfj0+LfmW8fkl+uAho8yb2o c80tpOjhOxCupCh1IN73f0a8pWNdlWRgQSCwUZoWbydM2ii6QG7ZJwx+WGXyqlUJdc17 NKeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=Xz4XR+Xh; 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=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a63f047000000b00553b9b18882si8011484pgj.574.2023.06.27.13.53.44; Tue, 27 Jun 2023 13:54:05 -0700 (PDT) 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=@nabijaczleweli.xyz header.s=202305 header.b=Xz4XR+Xh; 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=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbjF0Uuy (ORCPT + 99 others); Tue, 27 Jun 2023 16:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbjF0Uuu (ORCPT ); Tue, 27 Jun 2023 16:50:50 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 194BBED; Tue, 27 Jun 2023 13:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687899047; bh=zhLge2fIvDMjALdhMD05+tueCYzIk6/Kl0MFRGFrYIQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xz4XR+XhvVLaJ53FyxpTAVg+9gCf9wr8ep7qkuA+qDeraK1HpJ1LFDrexTiH/h75M fiPAAfxv9YULL4NL+HtBNQ+TLY/cMJW9zfR72jw0vJGQdyX71kSN1Ja9b7DcQRIX6G uouB8Cz9aeDP7eBTLwVKcuV6rZujjsk3IK7oP6v2ncr7dQrxnzRF+ky+zdW1ZYlgDh gn4fp6+g/5C8ftj9KCKTfTjJAoUmRxsQblZGus9n5v4zfWvKkgCPmtOpi2KZTM+e3P qYtGNNIhsd0Rq2Jcr1BtxCpjBzPYw65ZiD+sf7wBX8HU7T8EClw/kigOXlHJ4y8Tlj P8WKYPLisSabw== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 55DF412C2; Tue, 27 Jun 2023 22:50:47 +0200 (CEST) Date: Tue, 27 Jun 2023 22:50:46 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Amir Goldstein Cc: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Chung-Chiang Cheng , ltp@lists.linux.it Subject: [PATCH v4 0/3] fanotify accounting for fs/splice.c Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n5hw2fxp2pfe5yae" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 --n5hw2fxp2pfe5yae Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Always generate modify out, access in for splice; this gets automatically merged with no ugly special cases. No changes to 2/3 or 3/3. Ahelenia Ziemia=C5=84ska (3): splice: always fsnotify_access(in), fsnotify_modify(out) on success splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice splice: fsnotify_access(in), fsnotify_modify(out) on success in tee fs/splice.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) Interdiff against v3: diff --git a/fs/splice.c b/fs/splice.c index 2ecfccbda956..bdbabc2ebfff 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1184,10 +1184,6 @@ long do_splice(struct file *in, loff_t *off_in, stru= ct file *out, out->f_pos =3D offset; else *off_out =3D offset; - - // splice_write-> already marked out - // as modified via vfs_iter_write() - goto noaccessout; } else if (opipe) { if (off_out) return -ESPIPE; @@ -1211,11 +1207,10 @@ long do_splice(struct file *in, loff_t *off_in, str= uct file *out, } else return -EINVAL; =20 - if (ret > 0) + if (ret > 0) { fsnotify_modify(out); -noaccessout: - if (ret > 0) fsnotify_access(in); + } =20 return ret; } --=20 2.39.2 --n5hw2fxp2pfe5yae Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSbS6UACgkQvP0LAY0m WPEIMw/+JWEOYiu+hu5odjWLPEeBk1HxJLjWW/mnA5+RwtNhT6WM6079tZKVNNhj zhInTK49LjQX8Jwsi+uZUlCtFipKmQUv2poCx+6jA5TeaDeBXblG1Z6uNaMTDuOA oQG4uVxrwVtU56eKvllHj+BmG7pJbdGmrAlrRe9rVXemRw939VrVYKds/RUrYego uoxuW8pG1SZ26TnCf7FnRIDAqQsS1p5TE2YbUqF2SL5oCqrzyjH2KbHCG6GWXv8J FN4bcKcgEjCieAuKafa9htfQxLlGkOA58szfhC6EYkVqn2VhNqDBmFRI8vOH0aHh BaKveWDJxNmNxD1hSJob6rZpG7qxLgjcwVUaDt0BOL2I8YAMTUW475DhLkJO+ucu dDSZZOUB3hTexBUi8o/dnFUipR4/PZ+fAFY7G7Pwof5xopTsOf7BfNl0Ev4cd4RD oTO5qlaLl93iZIfQ8oMmI0vRntKfxvQ5nrTOclDyJ3uh0jdtYSsu1+3DfTNUQywl T1I+r3Z3uyYBM7mF0S4VBiL8NLi27S8slX1lv8xulTtLtabI7IDTEt9lZK7maTTx mwmaweT+NjxS7pezcJ1UbatL7VOquw1+wzIpsqlmvcCyCIiJ6G7tvRAzHySd5h/b yEbRkUgvT6gA/Pojwh1JbtVioAMEnvFHEMCnL2VmnlsUBYSN4Ro= =l/Wh -----END PGP SIGNATURE----- --n5hw2fxp2pfe5yae--