From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754285AbcIOPxb (ORCPT ); Thu, 15 Sep 2016 11:53:31 -0400 Received: from imap.thunk.org ([74.207.234.97]:55826 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbcIOPx3 (ORCPT ); Thu, 15 Sep 2016 11:53:29 -0400 Date: Thu, 15 Sep 2016 11:52:52 -0400 From: "Theodore Ts'o" To: Fabian Frederick Cc: Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6 linux-next] ext4: remove unneeded test in ext4_alloc_file_blocks() Message-ID: <20160915155252.5k453j76dgrveqgf@thunk.org> Mail-Followup-To: Theodore Ts'o , Fabian Frederick , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <1472069000-18897-1-git-send-email-fabf@skynet.be> <1472069000-18897-3-git-send-email-fabf@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472069000-18897-3-git-send-email-fabf@skynet.be> User-Agent: NeoMutt/ (1.7.0) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 10:03:16PM +0200, Fabian Frederick wrote: > ext4_alloc_file_blocks() is called from ext4_zero_range() and > ext4_fallocate() both already testing EXT4_INODE_EXTENTS > We can call ext_depth(inode) unconditionnally. > > Signed-off-by: Fabian Frederick Applied, although I also added a BUG_ON() check to make sure ext4_alloc_file_blocks() won't get called with an indirect-mapped inode in the future. - Ted