summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@analog.com>2007-05-31 05:31:55 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 05:54:07 +0200
commit3f0a6766e0cc5a577805732e5adb50a585c58175 (patch)
tree3bf7db1b2c4c7a30505c2ff5aa5d8da6b51504d6 /fs
parentNFS: Fix a refcount leakage in O_DIRECT (diff)
downloadlinux-3f0a6766e0cc5a577805732e5adb50a585c58175.tar.xz
linux-3f0a6766e0cc5a577805732e5adb50a585c58175.zip
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 <bryan.wu@analog.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ramfs/file-nommu.c2
1 files changed, 1 insertions, 1 deletions
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;
}