linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow
@ 2017-02-14  6:54 Darrick J. Wong
  2017-02-14 13:04 ` Brian Foster
  2017-02-16 20:21 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-02-14  6:54 UTC (permalink / raw)
  To: xfs; +Cc: dan.carpenter

Fix an uninitialized variable.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/xfs_reflink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index 2f3d2d5..da6d08f 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -362,7 +362,7 @@ xfs_reflink_convert_cow(
 	xfs_fileoff_t		end_fsb = XFS_B_TO_FSB(mp, offset + count);
 	xfs_extnum_t		idx;
 	bool			found;
-	int			error;
+	int			error = 0;
 
 	xfs_ilock(ip, XFS_ILOCK_EXCL);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow
  2017-02-14  6:54 [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow Darrick J. Wong
@ 2017-02-14 13:04 ` Brian Foster
  2017-02-16 20:21 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Foster @ 2017-02-14 13:04 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs, dan.carpenter

On Mon, Feb 13, 2017 at 10:54:17PM -0800, Darrick J. Wong wrote:
> Fix an uninitialized variable.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_reflink.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
> index 2f3d2d5..da6d08f 100644
> --- a/fs/xfs/xfs_reflink.c
> +++ b/fs/xfs/xfs_reflink.c
> @@ -362,7 +362,7 @@ xfs_reflink_convert_cow(
>  	xfs_fileoff_t		end_fsb = XFS_B_TO_FSB(mp, offset + count);
>  	xfs_extnum_t		idx;
>  	bool			found;
> -	int			error;
> +	int			error = 0;
>  
>  	xfs_ilock(ip, XFS_ILOCK_EXCL);
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow
  2017-02-14  6:54 [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow Darrick J. Wong
  2017-02-14 13:04 ` Brian Foster
@ 2017-02-16 20:21 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-02-16 20:21 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs, dan.carpenter

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-16 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14  6:54 [PATCH] xfs: fix uninitialized variable in _reflink_convert_cow Darrick J. Wong
2017-02-14 13:04 ` Brian Foster
2017-02-16 20:21 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).