[RFC PATCH 1/7] write-or-die.c: remove unused fsync_component() function
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 23, 2022, 03:47 UTC
- Message-ID
- <RFC-patch-1.7-e03c119c784-20220323T033928Z-avarab@gmail.com>
- In-Reply-To
- <RFC-cover-0.7-00000000000-20220323T033928Z-avarab@gmail.com>
This function added in 020406eaa52 (core.fsync: introduce granular fsync control infrastructure, 2022-03-10) hasn't been used, and appears not to be used by the follow-up series either?
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- cache.h | 1 - write-or-die.c | 7 ------- 2 files changed, 8 deletions(-)
diff --git a/cache.h b/cache.h index 84fafe2ed71..5d863f8c5e8 100644 --- a/cache.h +++ b/cache.h @@ -1766,7 +1766,6 @@ int copy_file_with_time(const char *dst, const char *src, int mode); void write_or_die(int fd, const void *buf, size_t count); void fsync_or_die(int fd, const char *); -int fsync_component(enum fsync_component component, int fd); void fsync_component_or_die(enum fsync_component component, int fd, const char *msg); static inline int batch_fsync_enabled(enum fsync_component component) diff --git a/write-or-die.c b/write-or-die.c index c4fd91b5b43..103698450c3 100644 --- a/write-or-die.c +++ b/write-or-die.c @@ -76,13 +76,6 @@ void fsync_or_die(int fd, const char *msg) die_errno("fsync error on '%s'", msg); } -int fsync_component(enum fsync_component component, int fd) -{ - if (fsync_components & component) - return maybe_fsync(fd); - return 0; -} - void fsync_component_or_die(enum fsync_component component, int fd, const char *msg) { if (fsync_components & component)
-- 2.35.1.1428.g1c1a0152d61