Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753480Ab1EIIYf (ORCPT ); Mon, 9 May 2011 04:24:35 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:54771 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753242Ab1EIIYd (ORCPT ); Mon, 9 May 2011 04:24:33 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Stephen Wilson Subject: Re: [PATCH 8/8] proc: allocate storage for numa_maps statistics once Cc: kosaki.motohiro@jp.fujitsu.com, Andrew Morton , Alexander Viro , Hugh Dickins , David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org In-Reply-To: <1303947349-3620-9-git-send-email-wilsons@start.ca> References: <1303947349-3620-1-git-send-email-wilsons@start.ca> <1303947349-3620-9-git-send-email-wilsons@start.ca> Message-Id: <20110509172613.166B.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.56.05 [ja] Date: Mon, 9 May 2011 17:24:30 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 840 Lines: 30 > static int numa_maps_open(struct inode *inode, struct file *file) > { > - return do_maps_open(inode, file, &proc_pid_numa_maps_op); > + struct numa_maps_private *priv; > + int ret = -ENOMEM; > + priv = kzalloc(sizeof(*priv), GFP_KERNEL); > + if (priv) { > + priv->proc_maps.pid = proc_pid(inode); > + ret = seq_open(file, &proc_pid_numa_maps_op); > + if (!ret) { > + struct seq_file *m = file->private_data; > + m->private = priv; > + } else { > + kfree(priv); > + } > + } > + return ret; > } Looks good to me. Reviewed-by: KOSAKI Motohiro -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/