Skip to contentSkip to conversation

ocfs2: checking the wrong variable in ocfs2_move_extent()

PATCH In review Dan Carpenter 2 participants 2 messages May 29, 2011 – Jun 1, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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".

fs/ocfs2/move_extents.c +1 -1
index 4c54884..f3eb060 100644
@@ -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;
 	}
maintainer
#1 lore raw

Re: [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".

This patch is now in the 'fixes' branch of ocfs2.git.

Joel

Quoted 14 lines
fs/ocfs2/move_extents.c +1 -1
index 4c54884..f3eb060 100644
@@ -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]