git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pandora: update defconfig
[pandora-kernel.git]
/
mm
/
truncate.c
diff --git
a/mm/truncate.c
b/mm/truncate.c
index
f42675a
..
937571b
100644
(file)
--- a/
mm/truncate.c
+++ b/
mm/truncate.c
@@
-548,18
+548,18
@@
EXPORT_SYMBOL(truncate_pagecache);
* NOTE! We have to be ready to update the memory sharing
* between the file and the memory map for a potential last
* incomplete page. Ugly, but necessary.
* NOTE! We have to be ready to update the memory sharing
* between the file and the memory map for a potential last
* incomplete page. Ugly, but necessary.
+ *
+ * This function is deprecated and simple_setsize or truncate_pagecache
+ * should be used instead.
*/
int vmtruncate(struct inode *inode, loff_t offset)
{
*/
int vmtruncate(struct inode *inode, loff_t offset)
{
- loff_t oldsize;
int error;
int error;
- error =
inode_newsize_ok
(inode, offset);
+ error =
simple_setsize
(inode, offset);
if (error)
return error;
if (error)
return error;
- oldsize = inode->i_size;
- i_size_write(inode, offset);
- truncate_pagecache(inode, oldsize, offset);
+
if (inode->i_op->truncate)
inode->i_op->truncate(inode);
if (inode->i_op->truncate)
inode->i_op->truncate(inode);