* [PATCH] xfsdump: Remove dead code from restore_extent().
@ 2024-09-03 17:41 Bill O'Donnell
2024-09-03 20:29 ` [External] : " mark.tinguely
2024-09-10 8:06 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Bill O'Donnell @ 2024-09-03 17:41 UTC (permalink / raw)
To: linux-xfs; +Cc: cem, djwong, sandeen, Bill O'Donnell
Remove dead code and from restore_extent() in content.c.
Variable rttrunc is constantly 0.
Coverity CID 1618877
Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>
---
restore/content.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/restore/content.c b/restore/content.c
index 7ec3a4d..20f9dbf 100644
--- a/restore/content.c
+++ b/restore/content.c
@@ -8495,7 +8495,6 @@ restore_extent(filehdr_t *fhdrp,
tries++,
remaining -= (size_t)rval,
tmp_off += (off64_t)rval) {
- int rttrunc = 0;
int trycnt = 0;
assert(remaining
<=
@@ -8535,12 +8534,6 @@ restore_extent(filehdr_t *fhdrp,
tmp_off,
rval);
}
- if (rttrunc) {
- /* truncate and re-set rval */
- if (rval == remaining)
- rval = rttrunc;
- ftruncate(fd, bstatp->bs_size);
- }
}
} else {
nwritten = (int)ntowrite;
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [External] : [PATCH] xfsdump: Remove dead code from restore_extent().
2024-09-03 17:41 [PATCH] xfsdump: Remove dead code from restore_extent() Bill O'Donnell
@ 2024-09-03 20:29 ` mark.tinguely
2024-09-10 8:06 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: mark.tinguely @ 2024-09-03 20:29 UTC (permalink / raw)
To: Bill O'Donnell, linux-xfs; +Cc: cem, djwong, sandeen
On 9/3/24 12:41 PM, Bill O'Donnell wrote:
> Remove dead code and from restore_extent() in content.c.
> Variable rttrunc is constantly 0.
>
> Coverity CID 1618877
>
> Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>
> ---
> restore/content.c | 7 -------
> 1 file changed, 7 deletions(-)
>
Looks like dead code.
Reviewed-by: Mark Tinguely <mark.tinguely@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfsdump: Remove dead code from restore_extent().
2024-09-03 17:41 [PATCH] xfsdump: Remove dead code from restore_extent() Bill O'Donnell
2024-09-03 20:29 ` [External] : " mark.tinguely
@ 2024-09-10 8:06 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2024-09-10 8:06 UTC (permalink / raw)
To: Bill O'Donnell; +Cc: linux-xfs, cem, djwong, sandeen
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-10 8:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 17:41 [PATCH] xfsdump: Remove dead code from restore_extent() Bill O'Donnell
2024-09-03 20:29 ` [External] : " mark.tinguely
2024-09-10 8:06 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox