AC_CHECK_LINUX_HEADER([semaphore.h])
AC_CHECK_LINUX_HEADER([seq_file.h])
+ dnl Type existence checks
+ AC_CHECK_LINUX_TYPE([struct vfs_path], [dcache.h])
+
dnl Check for structure elements
AC_CHECK_LINUX_STRUCT([address_space_operations],
[write_begin], [fs.h])
# endif
#endif
+#ifdef HAVE_LINUX_STRUCT_VFS_PATH
+typedef struct vfs_path afs_linux_path_t;
+#else
+typedef struct path afs_linux_path_t;
+#endif
+
#ifndef HAVE_LINUX_DO_SYNC_READ
static inline int
do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {
}
#else
static inline int
-afs_kern_path(char *aname, int flags, struct path *path) {
+afs_kern_path(char *aname, int flags, afs_linux_path_t *path) {
return kern_path(aname, flags, path);
}
#endif
#if defined(HAVE_LINUX_PATH_LOOKUP)
afs_get_dentry_ref(struct nameidata *nd, struct vfsmount **mnt, struct dentry **dpp) {
#else
-afs_get_dentry_ref(struct path *path, struct vfsmount **mnt, struct dentry **dpp) {
+afs_get_dentry_ref(afs_linux_path_t *path, struct vfsmount **mnt, struct dentry **dpp) {
#endif
#if defined(STRUCT_NAMEIDATA_HAS_PATH)
# if defined(HAVE_LINUX_PATH_LOOKUP)
static inline struct file *
afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct cred *creds) {
#if defined(DENTRY_OPEN_TAKES_PATH)
- struct path path;
+ afs_linux_path_t path;
struct file *filp;
path.mnt = mnt;
path.dentry = dp;
#if defined(HAVE_LINUX_PATH_LOOKUP)
struct nameidata path_data;
#else
- struct path path_data;
+ afs_linux_path_t path_data;
#endif
int flags = LOOKUP_POSITIVE;
code = ENOENT;
code = osi_lookupname_internal(tname, followlink, &mnt, &dp);
if (!code) {
#if defined(D_PATH_TAKES_STRUCT_PATH)
- struct path p = { mnt, dp };
+ afs_linux_path_t p = { mnt, dp };
path = d_path(&p, buf, buflen);
#else
path = d_path(dp, mnt, buf, buflen);