Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754595AbdCTLxG (ORCPT ); Mon, 20 Mar 2017 07:53:06 -0400 Received: from 1.multihost.cz ([88.86.107.244]:45963 "EHLO multihost.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753857AbdCTLxF (ORCPT ); Mon, 20 Mar 2017 07:53:05 -0400 Date: Mon, 20 Mar 2017 12:52:55 +0100 From: Filip =?utf-8?B?xaB0xJtkcm9uc2vDvQ==?= To: Jan Kara Cc: Amir Goldstein , linux-fsdevel , linux-kernel , Alexander Viro , Marko Rauhamaa Subject: Re: [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Message-ID: <20170320115255.viwh44ouh4fagnqu@rgvaio> References: <20170319101943.GA1844@quack2.suse.cz> <20170319103739.aavrnwtbh5qs7f5t@rgvaio> <20170319180413.GC1844@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170319180413.GC1844@quack2.suse.cz> User-Agent: NeoMutt/20170128 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 815 Lines: 22 Hi, On Sun, Mar 19, 2017 at 07:04:13PM +0100, Jan Kara wrote: > How come? In current kernel the call looks like: > > vfs_mknod(d_inode(path.dentry), dentry, mode, dev->devt); > > so the path is available there... I've actually quickly checked all > vfs_mknod() callers and they all seem to have path available. terribly sorry, must have misremembered something. Been staring at the code long into the night. You are quite right. But it is an internal mount so userspace never gets the notifications. The same goes for the cloned upper mount in overlayfs. This might be considered ok, because the change is semantically "internal" and does not originate through any userspace-visible mountpoint. Superblock watches would solve this case. Otherwise it seems feasible to pass a path to all VFS functions. Filip