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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 1F1FDC04AAF for ; Thu, 16 May 2019 17:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8BE5205ED for ; Thu, 16 May 2019 17:07:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbfEPRHM (ORCPT ); Thu, 16 May 2019 13:07:12 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:59624 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbfEPRHM (ORCPT ); Thu, 16 May 2019 13:07:12 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hRJqV-0004SL-PF; Thu, 16 May 2019 17:07:07 +0000 Date: Thu, 16 May 2019 18:07:07 +0100 From: Al Viro To: Amir Goldstein Cc: Jan Kara , Matthew Bobrowski , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 02/14] fs: create simple_remove() helper Message-ID: <20190516170707.GE17978@ZenIV.linux.org.uk> References: <20190516102641.6574-1-amir73il@gmail.com> <20190516102641.6574-3-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516102641.6574-3-amir73il@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, May 16, 2019 at 01:26:29PM +0300, Amir Goldstein wrote: > There is a common pattern among pseudo filesystems for removing a dentry > from code paths that are NOT coming from vfs_{unlink,rmdir}, using a > combination of simple_{unlink,rmdir} and d_delete(). > > Create an helper to perform this common operation. This helper is going > to be used as a place holder for the new fsnotify_{unlink,rmdir} hooks. This is the wrong approach. What we have is a bunch of places trying to implement recursive removal of a subtree. They are broken, each in its own way, and I'm not talking about fsnotify crap - there are much more unpleasant issues there. Trying to untangle that mess is not going to be made easier by mandating the calls of that helper of yours - if anything, it makes the whole thing harder to massage. It needs to be dealt with, no arguments here, but that's not a good starting point for that... I've taken several stabs at that, never got anywhere satisfactory with those ;-/ I'll try to dig out the notes/existing attempts at patch series; if you are willing to participate in discussing those and sorting the whole thing out, you are very welcome; just ping me in a couple of days.