Message ID | efd617db128969415cadb1635217c58d6eca1bd7.1731433903.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B309D42BBA for <linux-mm@archiver.kernel.org>; Tue, 12 Nov 2024 17:57:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38ADF6B0109; Tue, 12 Nov 2024 12:56:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 339F16B010A; Tue, 12 Nov 2024 12:56:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B3DE6B010B; Tue, 12 Nov 2024 12:56:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EBB436B0109 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 12:56:56 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B1F4A120446 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 17:56:56 +0000 (UTC) X-FDA: 82778197488.21.20516D4 Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by imf11.hostedemail.com (Postfix) with ESMTP id D97BF40013 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 17:56:02 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=aD3MzZ89; spf=none (imf11.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.174) smtp.mailfrom=josef@toxicpanda.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731434160; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3nbIBZPU5mMiQBH7fH9PUjd6pvpSRIo6Q0oL6vGrX38=; b=51MXdaa6jQfrcU1Z+4+erSz+iNYvTmFt8Zoo+Bz/J8SrG/kt6Kv2dwjGbndk+8Ghx5g7sQ Med081RG8URL8JvB+U+RmIPCfdAtFNNL3S4Ow3WsDwYS3W82jt2Ae8u708YQxUva5MUHuj U2dFwnPnz/1xrqDM/MsMm6YAITGO3nQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731434160; a=rsa-sha256; cv=none; b=6BdLjjuLe6L9ZbLP+JvBlx4MCOqBnQhSMo8BlkmhiSk9yAnyjvORlhC74S1IHWOxzbpo/O pbMLBPIg+0+vyEDkVJja3jTo8CsYO5i00oW+LSS2IyuIQHHYwVdmz7XfE4C8o4t/zo+XvN 83INiDxavlGfRrmLjvHtQRqHfwKqQws= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=aD3MzZ89; spf=none (imf11.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.219.174) smtp.mailfrom=josef@toxicpanda.com; dmarc=none Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-e30d1d97d20so5291609276.2 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 09:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1731434214; x=1732039014; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3nbIBZPU5mMiQBH7fH9PUjd6pvpSRIo6Q0oL6vGrX38=; b=aD3MzZ89+vqXOpyRZzYnMaeANjJ9FUB0na9XlljdVMfIqMb2aO5hDgBZqXOjz7aMT2 r96Qljrjny1Ev2tXy3u7E1x9yGajhi7P6EwsxcfS9rFjPj4tMSlhlgNMcSa89k2RLmEB pLvrz+/AkhWsVHASRd+JRDXopjfq4UOh87+DkxQLci/AIzdXyuWWhvxm/Q+Z9uHGVIFp gr+wucLVsjoFuwfofp1cUSTjRH6vw5chrLMNi3kWF59+dwZt0AtKxI6hL4Gz+IG+DC7t tvtqEzhcMsAdXKBuQ00ld7zPezt2y9GXFPKiubih9PAsixpKRucZI0W9xdv8l2B4ZjgQ rgdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731434214; x=1732039014; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3nbIBZPU5mMiQBH7fH9PUjd6pvpSRIo6Q0oL6vGrX38=; b=VdG+YfCS7+pHqJ6ifsNIJISQBngB15rZ0XMyELSMQ3zZksJw5FsdbmeZHByR5Ey5Gd swvLMTclcAQ09oOPkqkKUlZC8auaQ5lP2IkTsNIfLoaWlpzhCFmZrM8NwxTMs4mdPD/Y aQjhDBZjVLNL93nvPL691q8vshu3WYou/lQKbdr+kl81Syzduf2CWqCr3JlWo9Jsei73 usBk4/SOfQGFugtkBOwRRx7QEx0Nk/LW6m8P0qF1rea3I09ix6ihlJoDXbFv/MnxSJIt yUicOrp4sxKI9JzcgU/c8u5ahibXvedX4QfeghrxIHC5qB6cMbKj++ggk6+oxmyTJ744 Bpcg== X-Forwarded-Encrypted: i=1; AJvYcCXdzBDtqGu2gNlAetdJQnqSWiQ9HAFiKZ/HChU6FAgB761jkByBgeD33JTp3IeqkGToidkovAQRxg==@kvack.org X-Gm-Message-State: AOJu0YyxtoWC4yLD6dR624UMaHT8h1kPqhqE+h3ta5k9vSFKGWeG342s yLn5J8LAHDEaNPWoGqzs/dQMgWH07zR1htTZ1ZGVaLd9LGLtHZxSWQZ0RXM9Esw= X-Google-Smtp-Source: AGHT+IFiuIuaM6zhnPYYC70N0ed/AHQHsVCWIUgMJBIkKyN4ZxuOm530ZzxRBomBAB77BqDgpRvfSQ== X-Received: by 2002:a05:6902:150b:b0:e1d:c3ea:da14 with SMTP id 3f1490d57ef6-e337f8f0c7fmr17671301276.32.1731434213851; Tue, 12 Nov 2024 09:56:53 -0800 (PST) Received: from localhost (syn-076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e336ee15907sm2754453276.4.2024.11.12.09.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:56:53 -0800 (PST) From: Josef Bacik <josef@toxicpanda.com> To: kernel-team@fb.com, linux-fsdevel@vger.kernel.org, jack@suse.cz, amir73il@gmail.com, brauner@kernel.org, torvalds@linux-foundation.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org Subject: [PATCH v7 16/18] xfs: add pre-content fsnotify hook for write faults Date: Tue, 12 Nov 2024 12:55:31 -0500 Message-ID: <efd617db128969415cadb1635217c58d6eca1bd7.1731433903.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <cover.1731433903.git.josef@toxicpanda.com> References: <cover.1731433903.git.josef@toxicpanda.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: kymdi6ipfbndajpjhg1ws61qzqy7sstd X-Rspam-User: X-Rspamd-Queue-Id: D97BF40013 X-Rspamd-Server: rspam02 X-HE-Tag: 1731434162-461128 X-HE-Meta: U2FsdGVkX18xYCnlmZg0EQOHxPzTfJvP1WlLifpi4RqjA5ap+3iJHyIaWwI15lj0iHDQISt5xeCeQUqokv1FEwiQj+oblwR3LxBOu/RSU5sPIHn1Wr3hg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DG0w93jctnuKgdCJlWobb8M3gAPOH7Q8NCU7vJayIQBdaOiS8tq+VT5bhmZg6h30iD8H+Erpc7rDaZREfvfJJvNU71DoNZ1yVeAtcyQzl4eVOs+EEHEuMWheli2gf5TG5CtnrHcy1kOWbrarHuTtRJQssgEmvemY6/+6AJvSaBM4xFLEbzAUg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
fanotify: add pre-content hooks
|
expand
|
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index ca47cae5a40a..4fe89770ecb5 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1458,6 +1458,10 @@ xfs_write_fault( unsigned int lock_mode = XFS_MMAPLOCK_SHARED; vm_fault_t ret; + ret = filemap_fsnotify_fault(vmf); + if (unlikely(ret)) + return ret; + sb_start_pagefault(inode->i_sb); file_update_time(vmf->vma->vm_file);
xfs has it's own handling for write faults, so we need to add the pre-content fsnotify hook for this case. Reads go through filemap_fault so they're handled properly there. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- fs/xfs/xfs_file.c | 4 ++++ 1 file changed, 4 insertions(+)