ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: Remove obscure error handling in direct_write.
@ 2010-06-09  8:48 Tao Ma
  2010-08-12  0:31 ` Joel Becker
  0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2010-06-09  8:48 UTC (permalink / raw)
  To: ocfs2-devel

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>
---
 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 06fd85c..4f782b0 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2114,17 +2114,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(hch): 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)
-				simple_setsize(inode, inode->i_size);
 			ret = written;
 			goto out_dio;
 		}
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: Remove obscure error handling in direct_write.
  2010-06-09  8:48 [Ocfs2-devel] [PATCH] ocfs2: Remove obscure error handling in direct_write Tao Ma
@ 2010-08-12  0:31 ` Joel Becker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2010-08-12  0:31 UTC (permalink / raw)
  To: ocfs2-devel

On Wed, Jun 09, 2010 at 04:48:59PM +0800, Tao Ma wrote:
> 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>

        This patch is now in the merge-window branch of ocfs2.git.

Joel

-- 

Life's Little Instruction Book #444

	"Never underestimate the power of a kind word or deed."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-12  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09  8:48 [Ocfs2-devel] [PATCH] ocfs2: Remove obscure error handling in direct_write Tao Ma
2010-08-12  0:31 ` Joel Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).