diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index a151cec056..26597dcfd1 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -181,17 +181,6 @@ afs_suser(void *credp) * These are no-ops in user space */ -/* - * xflock should never fall through, the only files we know - * about are AFS files - */ -int -usr_flock(void) -{ - usr_assert(0); - return 0; -} - /* * ioctl should never fall through, the only files we know * about are AFS files diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index 76409b1ce9..dcf6886d46 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -201,7 +201,6 @@ typedef unsigned int fsblkcnt_t; #define statfs usr_statfs #define file usr_file #define dirent usr_dirent -#define flock usr_flock #define fid usr_fid #define sysent usr_sysent #define ifaddr usr_ifaddr @@ -1101,7 +1100,6 @@ struct usr_buf { struct vcache; #define afs_ucred_t struct usr_ucred -#define AFS_FLOCK flock struct usr_vnodeops { @@ -1136,7 +1134,7 @@ struct usr_vnodeops { int (*vn_strategy) (void); int (*vn_bread) (void); int (*vn_brelse) (void); - int (*vn_lockctl) (struct vcache *, struct AFS_FLOCK *, int, + int (*vn_lockctl) (struct vcache *, struct usr_flock *, int, afs_ucred_t *); int (*vn_fid) (struct vcache *avc, struct fid **); }; diff --git a/src/afs/afs.h b/src/afs/afs.h index c9fc7a01d4..2858b8307e 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -68,15 +68,15 @@ extern enum afs_shutdown_state afs_shuttingdown; #define AFS_VFS_FAKEFREE (2147483647) /* Moved from VNOPS/afs_vnop_flocks so can be used in prototypes */ -#if defined(AFS_HPUX102_ENV) -#define AFS_FLOCK k_flock +#if defined(UKERNEL) +# define AFS_FLOCK usr_flock +#elif defined(AFS_HPUX102_ENV) +# define AFS_FLOCK k_flock +#elif defined(AFS_SUN5_ENV) || (defined(AFS_LINUX_ENV) && !defined(AFS_LINUX_64BIT_KERNEL)) +# define AFS_FLOCK flock64 #else -#if defined(AFS_SUN5_ENV) || (defined(AFS_LINUX_ENV) && !defined(AFS_LINUX_64BIT_KERNEL)) -#define AFS_FLOCK flock64 -#else -#define AFS_FLOCK flock -#endif /* AFS_SUN65_ENV */ -#endif /* AFS_HPUX102_ENV */ +# define AFS_FLOCK flock +#endif /* UKERNEL */ /* The following are various levels of afs debugging */ #define AFSDEB_GENERAL 1 /* Standard debugging */