From patchwork Sun Jul 17 23:59:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Rees X-Patchwork-Id: 985232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6HNxWJt030233 for ; Sun, 17 Jul 2011 23:59:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756424Ab1GQX7v (ORCPT ); Sun, 17 Jul 2011 19:59:51 -0400 Received: from merit-proxy01.merit.edu ([207.75.116.193]:37643 "EHLO merit-proxy01.merit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756426Ab1GQX7u (ORCPT ); Sun, 17 Jul 2011 19:59:50 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by merit-proxy01.merit.edu (Postfix) with ESMTP id 79D642039850; Sun, 17 Jul 2011 19:59:50 -0400 (EDT) X-Virus-Scanned: amavisd-new at merit-proxy01.merit.edu Received: from merit-proxy01.merit.edu ([127.0.0.1]) by localhost (merit-proxy01.merit.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30+WmPKVoopj; Sun, 17 Jul 2011 19:59:50 -0400 (EDT) Received: from merit.edu (74-126-0-171.static.123.net [74.126.0.171]) by merit-proxy01.merit.edu (Postfix) with ESMTPSA id 1B619203984D; Sun, 17 Jul 2011 19:59:50 -0400 (EDT) From: Jim Rees To: Trond Myklebust Cc: linux-nfs@vger.kernel.org Subject: [PATCH v1 23/25] pnfsblock: Implement release_inval_marks Date: Sun, 17 Jul 2011 19:59:10 -0400 Message-Id: <1310947152-12255-24-git-send-email-rees@umich.edu> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1310947152-12255-1-git-send-email-rees@umich.edu> References: <1310947152-12255-1-git-send-email-rees@umich.edu> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 17 Jul 2011 23:59:52 +0000 (UTC) From: Zhang Jingwang Leaving it unimplemented will cause memory leak. Signed-off-by: Zhang Jingwang Signed-off-by: Benny Halevy Signed-off-by: Benny Halevy --- fs/nfs/blocklayout/blocklayout.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index d6ace20..f2ec40e 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -525,10 +525,15 @@ release_extents(struct pnfs_block_layout *bl, struct pnfs_layout_range *range) spin_unlock(&bl->bl_ext_lock); } -/* STUB */ static void release_inval_marks(struct pnfs_inval_markings *marks) { + struct pnfs_inval_tracking *pos, *temp; + + list_for_each_entry_safe(pos, temp, &marks->im_tree.mtt_stub, it_link) { + list_del(&pos->it_link); + kfree(pos); + } return; }