diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-06-09 16:48:59 +0800 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-09-10 08:38:52 -0700 |
commit | 95fa859a268fd7d9bae6f2d4d095e3f61100ac1b (patch) | |
tree | 93d006d3ac6e848c47ae5e3a3155e001d5bf42d7 /fs/ocfs2 | |
parent | 3c3f20c9813391ba4004764072989744395cf405 (diff) | |
download | kernel_samsung_smdk4412-95fa859a268fd7d9bae6f2d4d095e3f61100ac1b.zip kernel_samsung_smdk4412-95fa859a268fd7d9bae6f2d4d095e3f61100ac1b.tar.gz kernel_samsung_smdk4412-95fa859a268fd7d9bae6f2d4d095e3f61100ac1b.tar.bz2 |
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>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/file.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 9a03c15..4f9133f 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2312,17 +2312,6 @@ relock: written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, ppos, count, ocount); if (written < 0) { - /* - * direct write may have instantiated a few - * blocks outside i_size. Trim these off again. - * Don't need i_size_read because we hold i_mutex. - * - * XXX(truncate): this looks buggy because ocfs2 did not - * actually implement ->truncate. Take a look at - * the new truncate sequence and update this accordingly - */ - if (*ppos + count > inode->i_size) - truncate_setsize(inode, inode->i_size); ret = written; goto out_dio; } |