Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752896Ab2KPQgU (ORCPT ); Fri, 16 Nov 2012 11:36:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54619 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752371Ab2KPQgS (ORCPT ); Fri, 16 Nov 2012 11:36:18 -0500 Message-ID: <1353083773.2332.40.camel@perseus.themaw.net> Subject: Re: [PATCH] autofs4 - use simple_empty() for empty directory check From: Ian Kent To: Linus Torvalds Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel , Al Viro Date: Sat, 17 Nov 2012 00:36:13 +0800 In-Reply-To: References: <20121116041523.18624.46918.stgit@perseus.themaw.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 27 On Fri, 2012-11-16 at 07:45 -0800, Linus Torvalds wrote: > On Thu, Nov 15, 2012 at 8:15 PM, Ian Kent wrote: > > > > +static inline int __simple_empty(struct dentry *dentry) > > +{ > > This seems completely bogus. > > It's a duplicate of the existing fs/libfs.c "simple_empty()" function, > but without taking the outer lock. > > That kind of code duplication - and doing it in a totally different > file, and making it look autofs-specific - seems entirely wrong. Sure, are you recommending I alter the fs/libfs.c functions to add a function that doesn't have the outer lock, and have simple_empty() call that, then use it in autofs? Or are recommending I rework the autofs code? Ian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/