summarylogtreecommitdiffstats
path: root/0002-Linux-4.20-do_settimeofday-is-gone.patch
blob: f9407140997c73b8f863a7d0142c449c78e080cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 058bc3ef711a421da41d05420d75b7b68b1c9cce Mon Sep 17 00:00:00 2001
From: Mark Vitale <mvitale@sinenomine.net>
Date: Thu, 15 Nov 2018 15:31:37 -0500
Subject: [PATCH 2/5] Linux 4.20: do_settimeofday is gone

With Linux commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 'y2038:
remove unused time interfaces', do_settimeofday() is gone.

However, OpenAFS only calls do_settimeofday() from afs_osi_SetTime(),
which has been dead code since -settime support was removed from afsd
with commit 1d9888be486198868983048eeffabdfef5afa94b 'Remove
-settime/RXAFS_GetTime client support'.

Instead of fixing afs_osi_SetTime() to use a current Linux API, remove
it as dead code.

No functional change is incurred by this commit.  However, this change
is required in order to build OpenAFS on Linux 4.20.

Reviewed-on: https://gerrit.openafs.org/13392
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit aa80f892ec39e2984818090a6bb2047430836ee2)

Change-Id: I7f5ee9c21bc87cd261d87126bc3848d941ff5409
Reviewed-on: https://gerrit.openafs.org/13406
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
 src/afs/LINUX/osi_misc.c       | 12 ------------
 src/afs/LINUX/osi_prototypes.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
index 077d4edfb..655076779 100644
--- a/src/afs/LINUX/osi_misc.c
+++ b/src/afs/LINUX/osi_misc.c
@@ -28,18 +28,6 @@
 int afs_osicred_initialized = 0;
 afs_ucred_t afs_osi_cred;
 
-void
-afs_osi_SetTime(osi_timeval_t * tvp)
-{
-    struct timespec tv;
-    tv.tv_sec = tvp->tv_sec;
-    tv.tv_nsec = tvp->tv_usec * NSEC_PER_USEC;
-
-    AFS_STATCNT(osi_SetTime);
-
-    do_settimeofday(&tv);
-}
-
 void
 osi_linux_mask(void)
 {
diff --git a/src/afs/LINUX/osi_prototypes.h b/src/afs/LINUX/osi_prototypes.h
index 5002af1ca..70f6393f1 100644
--- a/src/afs/LINUX/osi_prototypes.h
+++ b/src/afs/LINUX/osi_prototypes.h
@@ -45,7 +45,6 @@ extern void osi_ioctl_init(void);
 extern void osi_ioctl_clean(void);
 
 /* osi_misc.c */
-extern void afs_osi_SetTime(osi_timeval_t * tvp);
 extern int osi_lookupname_internal(char *aname, int followlink,
 				   struct vfsmount **mnt, struct dentry **dpp);
 extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
-- 
2.20.1