From: Dan Carpenter Date: Sun, 29 May 2011 19:56:31 +0000 (+0300) Subject: ocfs2: checking the wrong variable in ocfs2_move_extent() X-Git-Tag: MMI-PSA29.97-13-9~17941^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d75be7c4771c7e4d5b5fa586a599af8473de32c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ocfs2: checking the wrong variable in ocfs2_move_extent() "new_phys_cpos" is always a valid pointer here. ocfs2_probe_alloc_group() allocates "*new_phys_cpos". Signed-off-by: Dan Carpenter Signed-off-by: Joel Becker --- diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index cd9427023d2e..d3433d60dbb9 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -746,7 +746,7 @@ static int ocfs2_move_extent(struct ocfs2_move_extents_context *context, */ ocfs2_probe_alloc_group(inode, gd_bh, &goal_bit, len, move_max_hop, new_phys_cpos); - if (!new_phys_cpos) { + if (!*new_phys_cpos) { ret = -ENOSPC; goto out_commit; }