[Intel-gfx] [PATCH] drm/i915: Truncate the inode as well as the backing pages on purge

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 4 17:22:28 CEST 2010


Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4cf2789..f599d77 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1497,6 +1497,7 @@ i915_gem_object_truncate(struct drm_gem_object *obj)
 	struct inode *inode;
 
 	inode = obj->filp->f_path.dentry->d_inode;
+	truncate_inode_pages(inode->i_mapping, 0);
 	if (inode->i_op->truncate)
 		inode->i_op->truncate (inode);
 
-- 
1.7.1




More information about the Intel-gfx mailing list