LINUX_INIT_WORK_HAS_DATA
LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
LINUX_SYSCTL_TABLE_CHECKING
+ LINUX_HAVE_IGET
+ LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH
LINUX_EXPORTS_SYS_CHDIR
LINUX_EXPORTS_SYS_CLOSE
LINUX_EXPORTS_SYS_OPEN
if test "x$ac_cv_linux_sysctl_table_checking" = "xyes" ; then
AC_DEFINE(SYSCTL_TABLE_CHECKING, 1, [define if your kernel has sysctl table checking])
fi
+ if test "x$ac_cv_linux_have_iget" = "xyes" ; then
+ AC_DEFINE(HAVE_IGET, 1, [define if your kernel has iget])
+ fi
+ if test "x$ac_cv_linux_struct_nameidata_has_path" = "xyes" ; then
+ AC_DEFINE(STRUCT_NAMEIDATA_HAS_PATH, 1, [define if your struct nameidata has path])
+ fi
if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if tasklist_lock exported])
fi
sizeof(struct osi_file));
}
memset(afile, 0, sizeof(struct osi_file));
+#ifdef AFS_CACHE_VNODE_PATH
+ if (ainode < 0) {
+ switch (ainode) {
+ case AFS_CACHE_CELLS_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CellItems");
+ break;
+ case AFS_CACHE_ITEMS_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CacheItems");
+ break;
+ case AFS_CACHE_VOLUME_INODE:
+ snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "VolumeItems");
+ break;
+ default:
+ osi_Panic("Invalid negative inode");
+ }
+ } else {
+ dummy = ainode / afs_numfilesperdir;
+ snprintf(fname, 1024, "%s/D%d/V%d", afs_cachebasedir, dummy, ainode);
+ }
+
+ code = osi_lookupname(fname, AFS_UIOSYS, 0, &dp);
+ if (code) {
+ osi_Panic("Failed cache file lookup: %s in UFSOpen\n", fname);
+ }
+ tip = dp->d_inode;
+#else
tip = iget(afs_cacheSBp, (u_long) ainode);
if (!tip)
osi_Panic("Can't get inode %d\n", ainode);
- tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
dp = d_alloc_anon(tip);
if (!dp)
osi_Panic("Can't get dentry for inode %d\n", ainode);
+#endif
+ tip->i_flags |= MS_NOATIME; /* Disable updating access times. */
filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
if (IS_ERR(filp))
#endif
if (!code) {
+#if defined(STRUCT_NAMEIDATA_HAS_PATH)
+ *dpp = dget(nd.path.dentry);
+ if (mnt)
+ *mnt = mntget(nd.path.mnt);
+ path_put(&nd.path);
+#else
*dpp = dget(nd.dentry);
if (mnt)
*mnt = mntget(nd.mnt);
path_release(&nd);
+#endif
}
return code;
}
ac_cv_linux_sysctl_table_checking=yes)])
AC_MSG_RESULT($ac_cv_linux_sysctl_table_checking)])
+AC_DEFUN([LINUX_HAVE_IGET], [
+ AC_MSG_CHECKING([for linux iget()])
+ AC_CACHE_VAL([ac_cv_linux_have_iget], [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
+ AC_TRY_KBUILD(
+[#include <linux/fs.h>],
+[iget(NULL, NULL);],
+ ac_cv_linux_have_iget=yes,
+ ac_cv_linux_have_iget=no)
+ CPPFLAGS="$save_CPPFLAGS"])
+ AC_MSG_RESULT($ac_cv_linux_have_iget)])
+
+AC_DEFUN([LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH], [
+ AC_MSG_CHECKING([for path in struct nameidata])
+ AC_CACHE_VAL([ac_cv_linux_struct_nameidata_has_path], [
+ AC_TRY_KBUILD(
+[#include <linux/namei.h>],
+[struct nameidata _nd;
+printk("%x\n", _nd.path);],
+ ac_cv_linux_struct_nameidata_has_path=yes,
+ ac_cv_linux_struct_nameidata_has_path=no)])
+ AC_MSG_RESULT($ac_cv_linux_struct_nameidata_has_path)])
+
#define AFS_64BIT_ENV 1
#define AFS_64BIT_CLIENT 1
+#ifndef HAVE_IGET
+#define AFS_CACHE_VNODE_PATH 1
+#endif
+
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef CONFIG_SMP