From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by kanga.kvack.org (Postfix) with ESMTP id 2D1946B0029 for ; Tue, 31 May 2011 20:43:29 -0400 (EDT) Date: Tue, 31 May 2011 20:43:14 -0400 From: Christoph Hellwig Subject: Re: [PATCH 7/14] drm/i915: adjust to new truncate_range Message-ID: <20110601004314.GD4433@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Andrew Morton , Chris Wilson , Keith Packard , Dave Airlie , linux-kernel@vger.kernel.org, linux-mm@kvack.org > /* Our goal here is to return as much of the memory as > * is possible back to the system as we are called from OOM. > * To do this we must instruct the shmfs to drop all of its > - * backing pages, *now*. Here we mirror the actions taken > - * when by shmem_delete_inode() to release the backing store. > + * backing pages, *now*. > */ > inode = obj->base.filp->f_path.dentry->d_inode; > - truncate_inode_pages(inode->i_mapping, 0); > if (inode->i_op->truncate_range) > inode->i_op->truncate_range(inode, 0, (loff_t)-1); > + else > + truncate_inode_pages(inode->i_mapping, 0); Given that it relies on beeing on shmemfs it should just call it directly. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org