--- linux-2.5.3-pre3/fs/reiserfs/inode.c.orig Wed Jan 23 20:15:38 2002
+++ linux-2.5.3-pre3/fs/reiserfs/inode.c Wed Jan 23 20:16:19 2002
@@ -269,7 +269,9 @@
pathrelse (&path);
if (p)
kunmap(bh_result->b_page) ;
- if ((args & GET_BLOCK_NO_HOLE)) {
+ // We do not return -ENOENT if there is a hole but page is uptodate, because it means
+ // That there is some MMAPED data associated with it that is yet to be written to disk.
+ if ((args & GET_BLOCK_NO_HOLE) && !Page_Uptodate(bh_result->b_page) ) {
return -ENOENT ;
}
return 0 ;
@@ -288,9 +290,13 @@
ret = 0 ;
if (blocknr) {
map_bh(bh_result, inode->i_sb, blocknr);
- } else if ((args & GET_BLOCK_NO_HOLE)) {
+ } else
+ // We do not return -ENOENT if there is a hole but page is uptodate, because it means
+ // That there is some MMAPED data associated with it that is yet to be written to disk.
+ if ((args & GET_BLOCK_NO_HOLE) && !Page_Uptodate(bh_result->b_page) ) {
ret = -ENOENT ;
- }
+ }
+
pathrelse (&path);
if (p)
kunmap(bh_result->b_page) ;