From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:60547 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765900AbcLVRb4 (ORCPT ); Thu, 22 Dec 2016 12:31:56 -0500 Date: Thu, 22 Dec 2016 18:31:54 +0100 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , linux-fsdevel , Lino Sanfilippo , Miklos Szeredi , Paul Moore Subject: Re: [PATCH 03/22] fanotify: Move recalculation of inode / vfsmount mask under mark_mutex Message-ID: <20161222173154.GA20532@quack2.suse.cz> References: <20161222091538.28702-1-jack@suse.cz> <20161222091538.28702-4-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 22-12-16 18:27:11, Amir Goldstein wrote: > On Thu, Dec 22, 2016 at 11:15 AM, Jan Kara wrote: > > Move recalculation of inode / vfsmount notification mask under > > group->mark_mutex of the mark which was modified. These are the only > > places where mask recalculation happens without mark being protected > > from detaching from inode / vfsmount which will cause issues with the > > following patches. > > > > What am I missing this time? > > dnotify_handle_event() > dnotify_recalc_inode_mask() > fsnotify_recalc_inode_mask() /* not under dnotify_group->mark_mutex */ Dnotify uses mark->lock to protect recalculation of mask which also protects mark from being removed from the list. Honza -- Jan Kara SUSE Labs, CR