diff options
author | Wengang Wang <wen.gang.wang@oracle.com> | 2009-07-13 05:38:58 +0200 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-07-21 02:36:07 +0200 |
commit | 1f4cea3790bf44137192f441ee84af256e3bf809 (patch) | |
tree | 64c83d47e0ea24f14b0237d9d63426e7e5af9227 /fs | |
parent | ocfs2: Fix error return in ocfs2_write_cluster() (diff) | |
download | linux-1f4cea3790bf44137192f441ee84af256e3bf809.tar.xz linux-1f4cea3790bf44137192f441ee84af256e3bf809.zip |
ocfs2: Fail ocfs2_get_block() immediately when a block needs allocation
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 <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/aops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 25aced3b0c7d..e511df101451 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -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)); |