From 3f0a6766e0cc5a577805732e5adb50a585c58175 Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Thu, 31 May 2007 11:31:55 +0800 Subject: [PATCH] a bug in ramfs_nommu_resize function, passing old size to vmtruncate It should be pass "newsize" to vmtruncate function to modify the inode->i_size, while the old size is passed to vmtruncate. This bug was caught by LTP truncate test case on Blackfin platform. After it was fixed, the LTP truncate test case passed. Signed-off-by: Bryan Wu Cc: David Howells Signed-off-by: Linus Torvalds --- fs/ramfs/file-nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 3b481d557edb..9345a46ffb32 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -179,7 +179,7 @@ static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) return ret; } - ret = vmtruncate(inode, size); + ret = vmtruncate(inode, newsize); return ret; } -- 2.20.1