From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Am=C3=A9rico_Wang?= Subject: Re: [PATCH] vfs: does call expand_files when needed Date: Wed, 18 Nov 2009 17:22:17 +0800 Message-ID: <2375c9f90911180122p19030ea2gc395030178eb706d@mail.gmail.com> References: <2375c9f90911172317x781e22a9y56ecb8e682e8e061@mail.gmail.com> <2375c9f90911180035v45b3f732gfe898092583a667a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Alexander Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Liu Aleaxander Return-path: Received: from mail-qy0-f174.google.com ([209.85.221.174]:36990 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754986AbZKRJWL (ORCPT ); Wed, 18 Nov 2009 04:22:11 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 18, 2009 at 4:54 PM, Liu Aleaxander wrote: > >>it's trivial, not so much an improvement, IMO. > So, shouldn't we do the optimize when there is a way to do that? > > While, I don't think so. And BTW, it's not just a problem of > optimization, but also make it be more sense: JUST call expand when > need. I don't know why you are rejecting about this, especially it did > optimized one call path(as you said), and it doesn't make the code > uglier than before but making it be more sense, and, in fact, a kind > of more readable. I am not rejecting it, I said this is trivial, so accepting it or droping it both are OK for me. I don't think the orignal code is ugly, '< fdt->max_fds' is not checked for expand_files(), but for find_next_zero_bit().