From patchwork Mon Nov 12 01:27:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ycnian@gmail.com X-Patchwork-Id: 1726251 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AA6943FCA5 for ; Mon, 12 Nov 2012 01:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363Ab2KLBhK (ORCPT ); Sun, 11 Nov 2012 20:37:10 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:34453 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab2KLBhK (ORCPT ); Sun, 11 Nov 2012 20:37:10 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so3916944pad.19 for ; Sun, 11 Nov 2012 17:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=a9ImztUoQgSwUf19YEYxgLABTEv78GOp4sjl7WnPmbY=; b=shVkW58jx71ueJakuZJYOQX3P1kp3cAsB0+AnZXnjaOiSsncr5I/dBP60hA5TT4IPX nISTqnnuViH8WY6Sork70jOXEuer6TqeTuQ8sGEkYQ1i+VYhHt4g/rZwAIxSaENHzouD yf4ElEusIfkapG7JmH4aWPDtkIuLwFlbKKuZqhyQXc9Cpbz2EsXlyYe662BcD3bimCUK JWpID/X0hrUUlpspkX//NtJ0/slWXEirkra5QE4MR5EjBM4qR8SsSOdNKKavfP6Usp4Y m3AZMQgD4YSNsTJoxNWGpk6Nq6i0Y9HoAJvidFI2nog86fOmsvT2dj1J1052lRsRb/bI wHyw== Received: by 10.68.213.6 with SMTP id no6mr46785848pbc.113.1352684229668; Sun, 11 Nov 2012 17:37:09 -0800 (PST) Received: from localhost ([159.226.5.131]) by mx.google.com with ESMTPS id k9sm3375706paz.22.2012.11.11.17.37.07 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Nov 2012 17:37:09 -0800 (PST) From: ycnian@gmail.com To: Trond.Myklebust@netapp.com Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, Yanchuan Nian Subject: [PATCH] nfs: Fix wrong slab cache in nfs_commit_mempool Date: Mon, 12 Nov 2012 09:27:37 +0800 Message-Id: <1352683657-5191-1-git-send-email-ycnian@gmail.com> X-Mailer: git-send-email 1.7.4.4 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Yanchuan Nian The slab cache in nfs_commit_mempool is wrong, and I think it is just a slip. I tested it on a x86-32 machine, the size of nfs_write_header is 544, and the size of nfs_commit_data is 408, so it works fine. It is also true that sizeof(struct nfs_write_header) > sizeof(struct nfs_commit_data) on other platforms in my opinoin. Just fix it. Signed-off-by: Yanchuan Nian --- fs/nfs/write.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 9347ab7..f710e39 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1829,7 +1829,7 @@ int __init nfs_init_writepagecache(void) goto out_destroy_write_mempool; nfs_commit_mempool = mempool_create_slab_pool(MIN_POOL_COMMIT, - nfs_wdata_cachep); + nfs_cdata_cachep); if (nfs_commit_mempool == NULL) goto out_destroy_commit_cache;