From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933629AbcIFPP6 (ORCPT ); Tue, 6 Sep 2016 11:15:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:59210 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565AbcIFPP5 (ORCPT ); Tue, 6 Sep 2016 11:15:57 -0400 Date: Tue, 6 Sep 2016 17:15:54 +0200 From: Jan Kara To: Eric Ren Cc: Geliang Tang , "Theodore Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] jbd2: add jbd2_journal_init() helper Message-ID: <20160906151554.GK28922@quack2.suse.cz> References: <4f138dd04ef1dd370642c24f4a801370cc12ca54.1472644753.git.geliangtang@gmail.com> <1b8c6456-dcf2-648d-2a29-6671fc519187@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b8c6456-dcf2-648d-2a29-6671fc519187@suse.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 03-09-16 17:33:39, Eric Ren wrote: > Hi Geliang, > > On 08/31/2016 08:23 PM, Geliang Tang wrote: > >There are some repetitive code in jbd2_journal_init_dev() and > >jbd2_journal_init_inode(). So this patch extracts the common code into > >jbd2_journal_init() helper to simplify the code. And fix the coding > >style warnings reported by checkpatch.pl by the way. > journal_init_common() is already there for the same purpose, right? > Do we really need another helper? Agreed, just move the common code into journal_init_common(). Also the __getblk() in jbd2_journal_init_dev() should be getblk_unmovable() so that would be a good preparatory fix to remove the need of the gfp argument. Honza -- Jan Kara SUSE Labs, CR