aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-06-09 04:48:59 -0400
committerJoel Becker <joel.becker@oracle.com>2010-09-10 11:38:52 -0400
commit95fa859a268fd7d9bae6f2d4d095e3f61100ac1b (patch)
tree93d006d3ac6e848c47ae5e3a3155e001d5bf42d7
parent3c3f20c9813391ba4004764072989744395cf405 (diff)
ocfs2: Remove obscure error handling in direct_write.
In ocfs2, actually we don't allow any direct write pass i_size, see the function ocfs2_prepare_inode_for_write. So we don't need the bogus simple_setsize. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
-rw-r--r--fs/ocfs2/file.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 9a03c151b5ce..4f9133f6368e 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2312,17 +2312,6 @@ relock:
2312 written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, 2312 written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos,
2313 ppos, count, ocount); 2313 ppos, count, ocount);
2314 if (written < 0) { 2314 if (written < 0) {
2315 /*
2316 * direct write may have instantiated a few
2317 * blocks outside i_size. Trim these off again.
2318 * Don't need i_size_read because we hold i_mutex.
2319 *
2320 * XXX(truncate): this looks buggy because ocfs2 did not
2321 * actually implement ->truncate. Take a look at
2322 * the new truncate sequence and update this accordingly
2323 */
2324 if (*ppos + count > inode->i_size)
2325 truncate_setsize(inode, inode->i_size);
2326 ret = written; 2315 ret = written;
2327 goto out_dio; 2316 goto out_dio;
2328 } 2317 }