From patchwork Thu Aug 29 20:11:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 2851591 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49272C0AB5 for ; Thu, 29 Aug 2013 20:12:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 685F02055F for ; Thu, 29 Aug 2013 20:12:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59E4B20549 for ; Thu, 29 Aug 2013 20:12:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757289Ab3H2UMC (ORCPT ); Thu, 29 Aug 2013 16:12:02 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:33754 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757112Ab3H2UMA (ORCPT ); Thu, 29 Aug 2013 16:12:00 -0400 Received: from [108.38.126.162] (account joe@perches.com HELO localhost.localdomain) by labridge.com (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 21313847; Thu, 29 Aug 2013 13:12:00 -0700 From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Sage Weil , ceph-devel@vger.kernel.org Subject: [PATCH 5/6] ceph: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc Date: Thu, 29 Aug 2013 13:11:09 -0700 Message-Id: X-Mailer: git-send-email 1.8.1.2.459.gbcd45b4.dirty In-Reply-To: References: Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The helper exists, might as well use it instead of __GFP_ZERO. Signed-off-by: Joe Perches --- fs/ceph/dir.c | 2 +- fs/ceph/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 868b61d..c10bc70 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -40,7 +40,7 @@ int ceph_init_dentry(struct dentry *dentry) if (dentry->d_fsdata) return 0; - di = kmem_cache_alloc(ceph_dentry_cachep, GFP_NOFS | __GFP_ZERO); + di = kmem_cache_zalloc(ceph_dentry_cachep, GFP_NOFS); if (!di) return -ENOMEM; /* oh well */ diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 20d0222..1b5f8ec 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -75,7 +75,7 @@ static int ceph_init_file(struct inode *inode, struct file *file, int fmode) case S_IFDIR: dout("init_file %p %p 0%o (regular)\n", inode, file, inode->i_mode); - cf = kmem_cache_alloc(ceph_file_cachep, GFP_NOFS | __GFP_ZERO); + cf = kmem_cache_zalloc(ceph_file_cachep, GFP_NOFS); if (cf == NULL) { ceph_put_fmode(ceph_inode(inode), fmode); /* clean up */ return -ENOMEM;