* [PATCH] ntfs: delete dead code
@ 2026-04-10 10:10 Dan Carpenter
2026-04-10 23:25 ` Hyunchul Lee
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-04-10 10:10 UTC (permalink / raw)
To: Namjae Jeon; +Cc: Hyunchul Lee, linux-fsdevel, linux-kernel, kernel-janitors
We know "ret2" is zero so there is no need to check. Delete the
if statement.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
fs/ntfs/file.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index e5b897a6c1e1..b04919124989 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -534,10 +534,9 @@ static ssize_t ntfs_dio_write_iter(struct kiocb *iocb, struct iov_iter *from)
ret = -EIO;
goto out;
}
- if (!ret2)
- invalidate_mapping_pages(iocb->ki_filp->f_mapping,
- offset >> PAGE_SHIFT,
- end >> PAGE_SHIFT);
+ invalidate_mapping_pages(iocb->ki_filp->f_mapping,
+ offset >> PAGE_SHIFT,
+ end >> PAGE_SHIFT);
}
out:
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ntfs: delete dead code
2026-04-10 10:10 [PATCH] ntfs: delete dead code Dan Carpenter
@ 2026-04-10 23:25 ` Hyunchul Lee
0 siblings, 0 replies; 2+ messages in thread
From: Hyunchul Lee @ 2026-04-10 23:25 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Namjae Jeon, linux-fsdevel, linux-kernel, kernel-janitors
2026년 4월 10일 (금) 오후 7:11, Dan Carpenter <error27@gmail.com>님이 작성:
>
> We know "ret2" is zero so there is no need to check. Delete the
> if statement.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Looks good to me.
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
> ---
> fs/ntfs/file.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
> index e5b897a6c1e1..b04919124989 100644
> --- a/fs/ntfs/file.c
> +++ b/fs/ntfs/file.c
> @@ -534,10 +534,9 @@ static ssize_t ntfs_dio_write_iter(struct kiocb *iocb, struct iov_iter *from)
> ret = -EIO;
> goto out;
> }
> - if (!ret2)
> - invalidate_mapping_pages(iocb->ki_filp->f_mapping,
> - offset >> PAGE_SHIFT,
> - end >> PAGE_SHIFT);
> + invalidate_mapping_pages(iocb->ki_filp->f_mapping,
> + offset >> PAGE_SHIFT,
> + end >> PAGE_SHIFT);
> }
>
> out:
> --
> 2.53.0
>
--
Thanks,
Hyunchul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-10 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 10:10 [PATCH] ntfs: delete dead code Dan Carpenter
2026-04-10 23:25 ` Hyunchul Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.