From b1b2a7cc0beea5736aff7001f2bd61b8ee6d7b09 Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Thu, 1 Dec 2022 10:16:22 +0800 Subject: [PATCH] timerfd_create: initial reference count to zero nx_open in timerfd_create will increase reference count, Therefore, the reference count starts with a value of 0. Signed-off-by: dongjiuzhu1 --- fs/vfs/fs_timerfd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/vfs/fs_timerfd.c b/fs/vfs/fs_timerfd.c index 25e0af1d97..d6c5460aa6 100644 --- a/fs/vfs/fs_timerfd.c +++ b/fs/vfs/fs_timerfd.c @@ -544,9 +544,6 @@ int timerfd_create(int clockid, int flags) /* Initialize the timer instance */ new_dev->clock = clockid; - new_dev->crefs = 1; - new_dev->delay = 0; - new_dev->counter = 0; /* Request a unique minor device number */