Displaying 1 result from an estimated 1 matches for "4c18f4a".
2010 Jul 16
1
[PATCH] ocfs2: make __ocfs2_page_mkwrite handle file end properly.
...ins i_size - 1.
2. the len in the last page is also calculated wrong.
So change them accordingly.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
fs/ocfs2/mmap.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index af2b8fe..4c18f4a 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -74,9 +74,11 @@ static int __ocfs2_page_mkwrite(struct inode *inode, struct buffer_head *di_bh,
/*
* Another node might have truncated while we were waiting on
* cluster locks.
+ * We don't check size == 0 before the shift. This is...