summaryrefslogtreecommitdiff
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-12 08:46:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-12 08:46:23 -0800
commitb49199c827d81c6dfb8ebb325292aa6b94b45e3d (patch)
tree396a9d57746f278c2a4a4ba1d92e79380eb968a7 /fs/gfs2/bmap.c
parent4dfd459b738cf1f65b3eac4e0a9b19bc93cc91c6 (diff)
parent07ccb7bf2c928fef4fea2cda69ba2e23479578db (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes: GFS2: Fix bmap allocation corner-case bug GFS2: Fix error code
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 6d47379e794b..583e823307ae 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -541,7 +541,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock,
*ptr++ = cpu_to_be64(bn++);
break;
}
- } while (state != ALLOC_DATA);
+ } while ((state != ALLOC_DATA) || !dblock);
ip->i_height = height;
gfs2_add_inode_blocks(&ip->i_inode, alloced);