Skip to content

Commit

Permalink
ocfs2: checking the wrong variable in ocfs2_move_extent()
Browse files Browse the repository at this point in the history
"new_phys_cpos" is always a valid pointer here.
ocfs2_probe_alloc_group() allocates "*new_phys_cpos".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
  • Loading branch information
Dan Carpenter authored and Joel Becker committed Jun 1, 2011
1 parent 03efed8 commit 3d75be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/move_extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d75be7

Please sign in to comment.