drm/i915: Truncate the inode as well as the backing pages on purge
diff mbox

Message ID 1280935348-15247-1-git-send-email-chris@chris-wilson.co.uk
State Deferred, archived
Headers show

Commit Message

Chris Wilson Aug. 4, 2010, 3:22 p.m. UTC
None

Patch
diff mbox

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);