From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FED0C433E3 for ; Mon, 29 Jun 2020 19:09:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4763D206F1 for ; Mon, 29 Jun 2020 19:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593457766; bh=SsCIgboIh8MwG59svpDcWx6ceBeWIXunSMvUsAXqGmw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=QDMaQNi4J4A6wkajKXuB8EqvaKrL0Gy3yuSxR2cAfSWI+PVHwMzgXD7NeDB0wfoAI fbkiqbYsLwM8JL5DKtTNOM6SBGhMtK17JxciSfVyC1PjxCcpgTQY2GjLTQuNKpF5OH jQSmhMXT+04FE/K89y3i74M5gDbtQm6qQMIbXLVw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730553AbgF2TJZ (ORCPT ); Mon, 29 Jun 2020 15:09:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:45474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730340AbgF2TAU (ORCPT ); Mon, 29 Jun 2020 15:00:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3478625586; Mon, 29 Jun 2020 16:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593447098; bh=SsCIgboIh8MwG59svpDcWx6ceBeWIXunSMvUsAXqGmw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ykePTvgrdPFZQukrlOu7yodEStnFvpYDYm3C8XTl6GP7/ObdeVffikq9Uf0ZgQund tnKNp0ZPHR0ZXTbRcjuTfkfcHZjXVuOHvRWCeI86Zbi4xJ5G7Gz8QxOae4WwVXwTHw aVBWoHudzgee/57w8Io6JWTfCH3rqZuPueMYOUMc= Date: Mon, 29 Jun 2020 18:11:29 +0200 From: Greg Kroah-Hartman To: Amir Goldstein Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Tejun Heo Subject: Re: [PATCH 05/20] kernfs: do not call fsnotify() with name without a parent Message-ID: <20200629161129.GA629636@kroah.com> References: <20200612093343.5669-1-amir73il@gmail.com> <20200612093343.5669-6-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200612093343.5669-6-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Jun 12, 2020 at 12:33:28PM +0300, Amir Goldstein wrote: > When creating an FS_MODIFY event on inode itself (not on parent) > the file_name argument should be NULL. > > The change to send a non NULL name to inode itself was done on purpuse > as part of another commit, as Tejun writes: "...While at it, supply the > target file name to fsnotify() from kernfs_node->name.". > > But this is wrong practice and inconsistent with inotify behavior when > watching a single file. When a child is being watched (as opposed to the > parent directory) the inotify event should contain the watch descriptor, > but not the file name. > > Fixes: df6a58c5c5aa ("kernfs: don't depend on d_find_any_alias()...") > Cc: Tejun Heo > Cc: Greg Kroah-Hartman > Signed-off-by: Amir Goldstein Acked-by: Greg Kroah-Hartman