Skip to content

Commit

Permalink
ocfs2: Fail ocfs2_get_block() immediately when a block needs allocation
Browse files Browse the repository at this point in the history
ocfs2_get_block() does no allocation.  Hole filling for writes should
have happened farther up in the call chain.  We detect this case and
print an error, but we then continue with the function.  We should be
exiting immediately.

Signed-off-by: Wengang Wang <[email protected]>
Signed-off-by: Joel Becker <[email protected]>
  • Loading branch information
Wengang-oracle authored and Joel Becker committed Jul 21, 2009
1 parent cbfa963 commit 1f4cea3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
(unsigned long long)OCFS2_I(inode)->ip_blkno);
mlog(ML_ERROR, "Size %llu, clusters %u\n", (unsigned long long)i_size_read(inode), OCFS2_I(inode)->ip_clusters);
dump_stack();
goto bail;
}

past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode));
Expand Down

0 comments on commit 1f4cea3

Please sign in to comment.