SHA256
1
0
forked from pool/openafs
openafs/0d9f6cf.diff
Christof Hanke cfa65eea8c Accepting request 1170220 from home:hauky:branches:filesystems
- update to openafs-1.8.11
- apply upstream patches for kernel 6.8
  * 056a7a8.diff
  * 05ac614.diff
  * 073adec.diff
  * 0d9f6cf.diff
  * 0e983a9.diff
  * 112fb94.diff
  * 1e1bf8e.diff
  * 2056ce8.diff
  * 5312d06.diff
  * 67e48c8.diff
  * 6b20756.diff
  * 743d72f.diff
  * 7cae97b.diff
  * 81b910a.diff
  * 87ab04a.diff
  * 9f052c1.diff
  * a14a9ad.diff
  * a87845d.diff
  * aae8b00.diff
  * b77b304.diff
  * d1c89ac.diff
  * d9f3a2c.diff
  * db91384.diff
  * dffd0e1.diff
  * e0f425a.diff
  * e157f8f.diff
  * e428053.diff
  * ef7b8c5.diff
  * f5bafb0.diff
  * fca6fd9.diff

OBS-URL: https://build.opensuse.org/request/show/1170220
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=123
2024-04-26 04:08:22 +00:00

135 lines
4.6 KiB
Diff

From 0d9f6cf121e49cfe1a2047b98d4c30b82a1898bd Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu, 15 Feb 2024 09:00:05 -0700
Subject: [PATCH] afs: Move function prototypes into headers
Several .c files contain external function prototypes, while the
implementing files do not have these prototypes.
Move these prototypes into header files so that the prototypes are
available to both the caller and the implementation.
Because the file holding the implementation does not have prototypes,
these functions are flagged when building against a Linux 6.8 kernel
(which sets the -Wmissing-declarations and -Wmissing-prototypes compiler
flags as default). Linux 6.8 commit:
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
When building against a kernel with CONFIG_WERROR=y, the build fails.
Add the prototypes for the following to afs_prototypes.h:
exporter_add
afs_syscall (AFS_LINUX_ENV)
BlobScan
Remove the prototypes from the .c files where they are referenced.
Reviewed-on: https://gerrit.openafs.org/15642
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 85781d7e83ae4501d8ab267bf55ef63f90f63101)
Change-Id: I74333e99e08af88bebdcbff4767d79397acac358
---
diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
index fbdee29..3e79774 100644
--- a/src/afs/LINUX/osi_ioctl.c
+++ b/src/afs/LINUX/osi_ioctl.c
@@ -34,9 +34,6 @@
extern struct proc_dir_entry *openafs_procfs;
-extern asmlinkage long
-afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
-
static int
afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
diff --git a/src/afs/LINUX/osi_syscall.c b/src/afs/LINUX/osi_syscall.c
index 5e9e519..dc78da8 100644
--- a/src/afs/LINUX/osi_syscall.c
+++ b/src/afs/LINUX/osi_syscall.c
@@ -91,9 +91,6 @@
/***** ALL PLATFORMS *****/
-extern asmlinkage long
-afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
-
static SYSCALLTYPE *afs_sys_call_table;
static SYSCALLTYPE afs_ni_syscall = 0;
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 7e85aa5..08fccb1 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -407,8 +407,6 @@
}
#endif
-extern int BlobScan(struct dcache * afile, afs_int32 ablob, afs_int32 *ablobOut);
-
/* This is a complete rewrite of afs_readdir, since we can make use of
* filldir instead of afs_readdir_move. Note that changes to vcache/dcache
* handling and use of bulkstats will need to be reflected here as well.
diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c
index e1796c5..0fbe4e8 100644
--- a/src/afs/VNOPS/afs_vnop_lookup.c
+++ b/src/afs/VNOPS/afs_vnop_lookup.c
@@ -667,8 +667,6 @@
return 0;
}
-extern int BlobScan(struct dcache * afile, afs_int32 ablob, afs_int32 *ablobOut);
-
/* called with an unlocked directory and directory cookie. Areqp
* describes who is making the call.
* Scans the next N (about 30, typically) directory entries, and does
diff --git a/src/afs/afs_nfsclnt.c b/src/afs/afs_nfsclnt.c
index fbb5006..4c7806d 100644
--- a/src/afs/afs_nfsclnt.c
+++ b/src/afs/afs_nfsclnt.c
@@ -160,7 +160,6 @@
osi_Assert(ISAFS_GLOCK());
#endif
if (!init_nfsexporter) {
- extern struct afs_exporter *exporter_add();
init_nfsexporter = 1;
LOCK_INIT(&afs_xnfspag, "afs_xnfspag");
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
index 208bd03..9b3b1af 100644
--- a/src/afs/afs_prototypes.h
+++ b/src/afs/afs_prototypes.h
@@ -331,6 +331,8 @@
/* afs_exporter.c */
extern struct afs_exporter *root_exported;
+extern struct afs_exporter * exporter_add(afs_int32 size, struct exporterops *ops,
+ afs_int32 state, afs_int32 type, char *data);
extern struct afs_exporter *exporter_find(int type);
extern void shutdown_exporter(void);
@@ -923,6 +925,10 @@
extern int Afs_syscall(void);
#endif
+#if defined(AFS_LINUX_ENV)
+extern asmlinkage long afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
+#endif
+
/* afs_tokens.c */
struct ktc_tokenUnion;
struct ktc_setTokenData;
@@ -1292,6 +1298,7 @@
/* VNOPS/afs_vnop_readdir.c */
extern int afs_rd_stash_i;
+extern int BlobScan(struct dcache * afile, afs_int32 ablob, int *ablobOut);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
afs_ucred_t *acred, int *eofp);