Skip to contentSkip to conversation

xfs: fix uninitialized variable in _reflink_convert_cow

PATCH In review Darrick J. Wong 3 participants 3 messages Feb 14, 2017 – Feb 16, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: fix uninitialized variable in _reflink_convert_cow

Fix an uninitialized variable.

---
 fs/xfs/xfs_reflink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_reflink.c +1 -1
index 2f3d2d5..da6d08f 100644
@@ -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);
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Darrick J. Wong

Fix an uninitialized variable.

---

Quoted 20 lines
 fs/xfs/xfs_reflink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_reflink.c +1 -2
index 2f3d2d5..da6d08f 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html