From patchwork Fri Jun 10 14:47:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_B=C5=82aszkowski?= X-Patchwork-Id: 9169967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 74CEB604DB for ; Fri, 10 Jun 2016 14:47:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 652F228363 for ; Fri, 10 Jun 2016 14:47:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A15D28368; Fri, 10 Jun 2016 14:47:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C089F28363 for ; Fri, 10 Jun 2016 14:47:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932593AbcFJOrJ (ORCPT ); Fri, 10 Jun 2016 10:47:09 -0400 Received: from k22.active24.pl ([195.78.67.22]:40295 "EHLO k22.active24.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932571AbcFJOrI (ORCPT ); Fri, 10 Jun 2016 10:47:08 -0400 Received: from amavis.k22.active24.pl (localhost [127.0.0.1]) by k22.active24.pl (Postfix) with ESMTP id 3rR4ky2BVqzDnrb; Fri, 10 Jun 2016 16:47:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at k22.active24.pl Received: from k22.active24.pl ([127.0.0.1]) by amavis.k22.active24.pl (k22.active24.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gqJAYtImfwPb; Fri, 10 Jun 2016 16:47:06 +0200 (CEST) Received: from [192.168.208.2] (89-79-49-185.dynamic.chello.pl [89.79.49.185]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kb@sysmikro.com.pl) by k22.active24.pl (Postfix) with ESMTPSA id 3rR4ky0jsvzDnrR; Fri, 10 Jun 2016 16:47:06 +0200 (CEST) Subject: Re: freevxfs: hp-ux support. ( 1cce17017970c07) patchset 2/4 From: Krzysztof =?UTF-8?Q?B=C5=82aszkowski?= To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, Carlos Maiolino Organization: Systemy mikroprocesorowe Date: Fri, 10 Jun 2016 16:47:04 +0200 Message-ID: <1465570024.5573.25.camel@linux-q3cb.site> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP this is far more important and I decided that it is enough to use inode_init_once() in alloc_inode() because this is the only one place which uses kmem_cache_alloc() thus the callback for kmem_cache_create() is not required. From 36de33b8a96c5a1df89dc5b0b01aaa2f2ab44b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20B=C5=82aszkowski?= Date: Fri, 10 Jun 2016 13:13:31 +0200 Subject: [PATCH 2/4] fix lack of inode initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit there is nothing worse than just allocated inode without being initialized _once() Signed-off-by: Krzysztof Błaszkowski --- fs/freevxfs/vxfs_super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index e5eef14..455ce5b 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c @@ -127,6 +127,7 @@ static struct inode *vxfs_alloc_inode(struct super_block *sb) vi = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL); if (!vi) return NULL; + inode_init_once(&vi->vfs_inode); return &vi->vfs_inode; }