* [PATCH] xfs: free bp in xlog_find_zeroed() error path
@ 2013-08-01 1:32 Eric Sandeen
2013-08-01 14:10 ` Mark Tinguely
2013-08-13 21:34 ` Ben Myers
0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2013-08-01 1:32 UTC (permalink / raw)
To: xfs-oss
xlog_find_zeroed() currently leaks a bp on one error path.
Using the bp_err: target resolves this.
Found by Coverity.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
p.s. this can be merged to userspace as well.
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 6fcc910a..2e10742 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1144,7 +1144,8 @@ xlog_find_zeroed(
*/
xfs_warn(log->l_mp,
"Log inconsistent or not a log (last==0, first!=1)");
- return XFS_ERROR(EINVAL);
+ error = XFS_ERROR(EINVAL);
+ goto bp_err;
}
/* we have a partially zeroed log */
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: free bp in xlog_find_zeroed() error path
2013-08-01 1:32 [PATCH] xfs: free bp in xlog_find_zeroed() error path Eric Sandeen
@ 2013-08-01 14:10 ` Mark Tinguely
2013-08-13 21:34 ` Ben Myers
1 sibling, 0 replies; 3+ messages in thread
From: Mark Tinguely @ 2013-08-01 14:10 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On 07/31/13 20:32, Eric Sandeen wrote:
> xlog_find_zeroed() currently leaks a bp on one error path.
>
> Using the bp_err: target resolves this.
>
> Found by Coverity.
>
> Signed-off-by: Eric Sandeen<sandeen@redhat.com>
> ---
Looks good.
> p.s. this can be merged to userspace as well.
or get it in before the 3.12 series gets rebased.
Reviewed-by; Mark Tinguely <tinguely@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: free bp in xlog_find_zeroed() error path
2013-08-01 1:32 [PATCH] xfs: free bp in xlog_find_zeroed() error path Eric Sandeen
2013-08-01 14:10 ` Mark Tinguely
@ 2013-08-13 21:34 ` Ben Myers
1 sibling, 0 replies; 3+ messages in thread
From: Ben Myers @ 2013-08-13 21:34 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
On Wed, Jul 31, 2013 at 08:32:30PM -0500, Eric Sandeen wrote:
> xlog_find_zeroed() currently leaks a bp on one error path.
>
> Using the bp_err: target resolves this.
>
> Found by Coverity.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Applied.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-13 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 1:32 [PATCH] xfs: free bp in xlog_find_zeroed() error path Eric Sandeen
2013-08-01 14:10 ` Mark Tinguely
2013-08-13 21:34 ` Ben Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox