Skip to contentSkip to conversation

xfs: remove unnecessary variable

PATCH In review Darrick J. Wong 1 participant 2 messages Jan 24, 2020 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: remove unnecessary variable

From: Darrick J. Wong <[email protected]>

Stephen Rothwell reported an unused variable. Remove it.

Fixes 4bbb04abb4ee ("xfs: truncate should remove all blocks, not just to the end of the page cache")
---
 fs/xfs/xfs_inode.c |    1 -
 1 file changed, 1 deletion(-)
fs/xfs/xfs_inode.c +0 -1
index 1309f25c0d2b..1979a0055763 100644
@@ -1520,7 +1520,6 @@ xfs_itruncate_extents_flags(
 	xfs_fileoff_t		first_unmap_block;
 	xfs_filblks_t		unmap_len;
 	int			error = 0;
-	int			done = 0;
 
 	ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
 	ASSERT(!atomic_read(&VFS_I(ip)->i_count) ||
#1 lore raw
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Stephen Rothwell reported an unused variable. Remove it.

Fixes 4bbb04abb4ee ("xfs: truncate should remove all blocks, not just to the end of the page cache")

self NAK, YueHaibing already sent this, which going through bash history I evidently misapplied and ... yeah. I've lost my marbles. :(

--D

Quoted 16 lines
---
 fs/xfs/xfs_inode.c |    1 -
 1 file changed, 1 deletion(-)
fs/xfs/xfs_inode.c +0 -1
index 1309f25c0d2b..1979a0055763 100644
@@ -1520,7 +1520,6 @@ xfs_itruncate_extents_flags(
 	xfs_fileoff_t		first_unmap_block;
 	xfs_filblks_t		unmap_len;
 	int			error = 0;
-	int			done = 0;
 
 	ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
 	ASSERT(!atomic_read(&VFS_I(ip)->i_count) ||