aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 1c6220a8e072..6a13ea64c447 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1052,7 +1052,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
1052 } 1052 }
1053 1053
1054 /* 1054 /*
1055 * This will intentionally not wind up calling vmtruncate(), 1055 * This will intentionally not wind up calling simple_setsize(),
1056 * since all the work for a size change has been done above. 1056 * since all the work for a size change has been done above.
1057 * Otherwise, we could get into problems with truncate as 1057 * Otherwise, we could get into problems with truncate as
1058 * ip_alloc_sem is used there to protect against i_size 1058 * ip_alloc_sem is used there to protect against i_size
@@ -2118,9 +2118,13 @@ relock:
2118 * direct write may have instantiated a few 2118 * direct write may have instantiated a few
2119 * blocks outside i_size. Trim these off again. 2119 * blocks outside i_size. Trim these off again.
2120 * Don't need i_size_read because we hold i_mutex. 2120 * Don't need i_size_read because we hold i_mutex.
2121 *
2122 * XXX(hch): this looks buggy because ocfs2 did not
2123 * actually implement ->truncate. Take a look at
2124 * the new truncate sequence and update this accordingly
2121 */ 2125 */
2122 if (*ppos + count > inode->i_size) 2126 if (*ppos + count > inode->i_size)
2123 vmtruncate(inode, inode->i_size); 2127 simple_setsize(inode, inode->i_size);
2124 ret = written; 2128 ret = written;
2125 goto out_dio; 2129 goto out_dio;
2126 } 2130 }