Message ID | ce1cc82322ae850a0b5f36e72b8eb78ad9969b7c.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 A11A5D42BBE for <linux-mm@archiver.kernel.org>; Tue, 12 Nov 2024 17:56:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C50B6B00FA; Tue, 12 Nov 2024 12:56:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 274886B00FB; Tue, 12 Nov 2024 12:56:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 116CD6B00FC; Tue, 12 Nov 2024 12:56:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DFCEF6B00FA for <linux-mm@kvack.org>; Tue, 12 Nov 2024 12:56:33 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 65E9A160408 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 17:56:33 +0000 (UTC) X-FDA: 82778196102.27.9723DD9 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by imf11.hostedemail.com (Postfix) with ESMTP id AAB9540012 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 17:55:39 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=U6aiWphn; spf=none (imf11.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.128.173) 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=1731434048; 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=DjBGMOunPJ0cAEWOCfFP2w1O3j7Clx8hp97a9eP3Qf4=; b=TcSp8j+e0tbwQkDeeot6p6XKPmzKBPh4eXA2zbyKGLy4+5BjbXaP5zByji+6OCm+SQT3Y2 1+T7iMtV5Cy5aCZ6w6rImDuDRBGTZjPqu004xFnXtNzM7v5T/Zhfr1yHIrQjzAc/6/FD1x NbxwOM43dxljcGEpLLV6eM9YwJdCV+A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731434048; a=rsa-sha256; cv=none; b=rsVvAT6MOF7Hs1SdHhfMgkXpwVUdpT2dxaWwLWmQB+gvc9v/LCVuj4TNSlnkywORCdO4Wn MgsK3QZRz9/q58kWNrZnKT/0z99r+9riDCJ6F9vQnjF2BxaMfpxQeNKqnTz1QKQEcxSPP/ bttQpIPLTz7w9cnO4q+b8PeEnBdaHSI= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=U6aiWphn; spf=none (imf11.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.128.173) smtp.mailfrom=josef@toxicpanda.com; dmarc=none Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-6e35bf59cf6so40527b3.0 for <linux-mm@kvack.org>; Tue, 12 Nov 2024 09:56:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1731434191; x=1732038991; 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=DjBGMOunPJ0cAEWOCfFP2w1O3j7Clx8hp97a9eP3Qf4=; b=U6aiWphnzRGhL5SUMomqopGWDRHUdz9wwB9uQacSPkYr41KAI/Kd4lhUYezpZFLpdw VDCzAR4OFiBA8DQmECoX8Kw3nWWSg14v4suXShSt5B4qrQstPSvQKsYVEQirG+jkWoqs /nQLmcM7//hNKSQq0PxNwNnbcrbgMd0AqQ7UqZB3rI8a7LQRKjSsbhHTmzqaHnyBPblA nY0CdcwLwtr7Hd00ZhQstihaYPJxPT/gSwUXLiS0QxF0RXb8zqOvr0l0jiDu29DOj2S7 SN2EAjTtc4OUFlqrMQfKXu9xntCwz1920rnLKQ/AbeQOkR8mn8d1TiQbN+2YqmxFpV8q rD2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731434191; x=1732038991; 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=DjBGMOunPJ0cAEWOCfFP2w1O3j7Clx8hp97a9eP3Qf4=; b=KXPC19iz28RKTMkVfKqsGq4K7OUopQp1wUuuACU5E+lQuvrPUhMLtDhhyDBKZkn2rC a9RvHpqHODeB+aBJQme6a5WBgFJtZvVerOhZ3Ch+dkXNEdwQbPtCgZMPGJZZ+n4eCKnV 5ALGEmfiyaluaJyKV9u3LQD4M/m8TqTtvL+N7yzlMRpwH6oC/CxCTeaQFidzYWrQ8O/U HU9vfB1eJ8p4mDytheFHRjmQSBcpjz41oFj/DhK61PpXxCpKLCpRaZRcL7E/iflio2s2 95Tlq/1hj9TqCwhSz6RVdgAkO39g8gbgKO37s58QNi5wzn+pka+WVlqv/ZyK5xk883Ga SUcw== X-Forwarded-Encrypted: i=1; AJvYcCVivJNd8S50sadQsNNx/bnzbWgvIJJO4LBQzfU/EwNqOCVsybi248nQtljgRoqedrqWEB7I4u1FVw==@kvack.org X-Gm-Message-State: AOJu0YyrGff1L6EBVG8gmbUYaa3Lr2SFF45bHdbbTe2CJKnZ81jhh55d B7ME+2S//Arjqmck8QxNJ5OP8G0C+L88XganfYHkIWEECDAo2l8taceDWlHCAO4= X-Google-Smtp-Source: AGHT+IE9ja6LbFpT71HNVj209iZC1LoqOzL3KmMfD6EjJ8DsteP+p2eBET7rNbO75x+IVtTpW9hviQ== X-Received: by 2002:a05:690c:6902:b0:6ea:86ae:cbc with SMTP id 00721157ae682-6eade510509mr128158657b3.13.1731434190711; Tue, 12 Nov 2024 09:56:30 -0800 (PST) Received: from localhost (syn-076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6eace8d520asm26537437b3.8.2024.11.12.09.56.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:56:30 -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 02/18] fanotify: don't skip extra event info if no info_mode is set Date: Tue, 12 Nov 2024 12:55:17 -0500 Message-ID: <ce1cc82322ae850a0b5f36e72b8eb78ad9969b7c.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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: AAB9540012 X-Stat-Signature: yohc31yc6wkchz3frbhfy7i4j1nzspxg X-HE-Tag: 1731434139-765442 X-HE-Meta: U2FsdGVkX1+2uHQb3QeMf2IGjNJWMuSoq4tV8iGCrEiU0jtN5kkvk124ka6Gld7MIzwDVFSDCT1YOb20gWb7+gn7bxIRo9RqfwAf7yqwTu5EVkvFZr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XEyBhVTGckPI2NbGZcfDsTqflSxwszH94VJ7p2RwbxJl4odNlOuW6W6Yn/ds0JmOxHDYhwc/sCHj5z1BxRs4WWSlir8F6DwaI/AAW30JqNHwLO6XktpMmWZDCTUO1q28iAgT/Evj54xOlVYN0ES0VPbEfYJ7zJsfFkyPrFvl64A0KjCEbHiJ2aysE9P+CYHqVjvr8fQ+EO/NtJ/IgolTP37OCINDpZXjw0iAGYQUaEMIZYm/4IJA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.013364, 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/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 2d85c71717d6..8528c1bfee7d 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -159,9 +159,6 @@ static size_t fanotify_event_len(unsigned int info_mode, int fh_len; int dot_len = 0; - if (!info_mode) - return event_len; - if (fanotify_is_error_event(event->mask)) event_len += FANOTIFY_ERROR_INFO_LEN; @@ -756,12 +753,10 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, buf += FAN_EVENT_METADATA_LEN; count -= FAN_EVENT_METADATA_LEN; - if (info_mode) { - ret = copy_info_records_to_user(event, info, info_mode, pidfd, - buf, count); - if (ret < 0) - goto out_close_fd; - } + ret = copy_info_records_to_user(event, info, info_mode, pidfd, + buf, count); + if (ret < 0) + goto out_close_fd; if (f) fd_install(fd, f);