Dan Carpenter
2011-May-29 19:56 UTC
[Ocfs2-devel] [patch] 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 <error27 at gmail.com> diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 4c54884..f3eb060 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -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
2011-Jun-01 02:23 UTC
[Ocfs2-devel] [patch] ocfs2: checking the wrong variable in ocfs2_move_extent()
On Sun, May 29, 2011 at 10:56:31PM +0300, Dan Carpenter wrote:> "new_phys_cpos" is always a valid pointer here. > ocfs2_probe_alloc_group() allocates "*new_phys_cpos". > > Signed-off-by: Dan Carpenter <error27 at gmail.com>This patch is now in the 'fixes' branch of ocfs2.git. Joel> > diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c > index 4c54884..f3eb060 100644 > --- a/fs/ocfs2/move_extents.c > +++ b/fs/ocfs2/move_extents.c > @@ -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; > }-- "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/ jlbec at evilplan.org
Possibly Parallel Threads
- [PATCH] ocfs2: fix non-auto defrag path not working issue
- [PATCH] ocfs2: fix defrag path triggering jbd2 ASSERT
- [PATCH v2] ocfs2: fix non-auto defrag path not working issue
- Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 4.19-stable tree
- Patch "ocfs2: fix defrag path triggering jbd2 ASSERT" has been added to the 5.15-stable tree