summaryrefslogtreecommitdiff
path: root/src/bio.c
diff options
context:
space:
mode:
authormenwen <menwenjun@gmail.com>2021-10-10 13:17:54 +0800
committerGitHub <noreply@github.com>2021-10-10 08:17:54 +0300
commit7ff7536e2c55a8a624eb52ffc35c08441425e683 (patch)
tree4710e047b0dbda5257f8bdffe3c48efa237ac477 /src/bio.c
parentb874c6f1fcf844d28f84fc2a2ab6b8f6c2458462 (diff)
downloadredis-7ff7536e2c55a8a624eb52ffc35c08441425e683.tar.gz
Delete unused 'time' fields from struct bio_job (#9622)
looks like this field was never actually used and the call to time() is excessive.
Diffstat (limited to 'src/bio.c')
-rw-r--r--src/bio.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/bio.c b/src/bio.c
index ff18c4fe7..f02389019 100644
--- a/src/bio.c
+++ b/src/bio.c
@@ -77,7 +77,6 @@ static unsigned long long bio_pending[BIO_NUM_OPS];
/* This structure represents a background Job. It is only used locally to this
* file as the API does not expose the internals at all. */
struct bio_job {
- time_t time; /* Time at which the job was created. */
/* Job specific arguments.*/
int fd; /* Fd for file based background jobs */
lazy_free_fn *free_fn; /* Function that will free the provided arguments */
@@ -127,7 +126,6 @@ void bioInit(void) {
}
void bioSubmitJob(int type, struct bio_job *job) {
- job->time = time(NULL);
pthread_mutex_lock(&bio_mutex[type]);
listAddNodeTail(bio_jobs[type],job);
bio_pending[type]++;