ocfs2: checking the wrong variable in ocfs2_move_extent()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
fs/ocfs2/move_extents.c +1 -1
@@ -747,7 +747,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; }
Joel Becker
maintainerRe: [patch] ocfs2: checking the wrong variable in
Quoted 4 lines · Dan Carpenter
"
new_phys_cpos" is always a valid pointer here.ocfs2_probe_alloc_group()allocates "*new_phys_cpos".Signed-off-by Dan Carpenter <[email protected]>
This patch is now in the 'fixes' branch of ocfs2.git.
Joel
Quoted 14 lines
fs/ocfs2/move_extents.c +1
-1@@ -747,7 +747,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; }
Signature · 6 lines
"If the human brain were so simple we could understand it, we would be so simple that we could not." - W. A. Clouston http://www.jlbec.org/ [email protected]