[Ocfs2-commits] zab commits r2535 - in trunk: . fs/configfs
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Aug 19 16:27:38 CDT 2005
Author: zab
Signed-off-by: mfasheh
Date: 2005-08-19 16:27:36 -0500 (Fri, 19 Aug 2005)
New Revision: 2535
Modified:
trunk/Config.make.in
trunk/configure.in
trunk/fs/configfs/Makefile
trunk/fs/configfs/symlink.c
Log:
o test for generic_read() with autoconf instead of KERNEL_VERSION. no more
K_V in configfs/ocfs2.
Signed-off-by: mfasheh
Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in 2005-08-19 18:40:34 UTC (rev 2534)
+++ trunk/Config.make.in 2005-08-19 21:27:36 UTC (rev 2535)
@@ -56,6 +56,7 @@
IDR_GET_NEW_RETURNS_ID = @IDR_GET_NEW_RETURNS_ID@
INET_SK_RETURNS_INET_OPT = @INET_SK_RETURNS_INET_OPT@
HAVE_SPARSE_ENDIAN_TYPES = @HAVE_SPARSE_ENDIAN_TYPES@
+HAVE_GENERIC_READLINK = @HAVE_GENERIC_READLINK@
OCFS_DEBUG = @OCFS_DEBUG@
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2005-08-19 18:40:34 UTC (rev 2534)
+++ trunk/configure.in 2005-08-19 21:27:36 UTC (rev 2535)
@@ -253,6 +253,11 @@
INET_SK_RETURNS_INET_OPT=yes, , [struct inet_opt \* inet_sk])
AC_SUBST(INET_SK_RETURNS_INET_OPT)
+HAVE_GENERIC_READLINK=
+OCFS2_CHECK_KERNEL([for generic_readlink()], fs.h,
+ HAVE_GENERIC_READLINK=yes, , [generic_readlink(])
+AC_SUBST(HAVE_GENERIC_READLINK)
+
# using -include has two advantages:
# the source doesn't need to know to include compat headers
# the compat header file names don't go through the search path
Modified: trunk/fs/configfs/Makefile
===================================================================
--- trunk/fs/configfs/Makefile 2005-08-19 18:40:34 UTC (rev 2534)
+++ trunk/fs/configfs/Makefile 2005-08-19 21:27:36 UTC (rev 2535)
@@ -17,6 +17,10 @@
EXTRA_CFLAGS += -DBACKING_DEV_CAPABILITIES
endif
+ifdef HAVE_GENERIC_READLINK
+EXTRA_CFLAGS += -DHAVE_GENERIC_READLINK
+endif
+
INSTALL_MOD_DIR := fs/configfs
obj-m := configfs.o configfs_example.o bobtest.o
Modified: trunk/fs/configfs/symlink.c
===================================================================
--- trunk/fs/configfs/symlink.c 2005-08-19 18:40:34 UTC (rev 2534)
+++ trunk/fs/configfs/symlink.c 2005-08-19 21:27:36 UTC (rev 2535)
@@ -24,8 +24,6 @@
* configfs Copyright (C) 2005 Oracle. All rights reserved.
*/
-#include <linux/version.h>
-#include <linux/utsname.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/namei.h>
@@ -249,7 +247,7 @@
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
+#ifndef HAVE_GENERIC_READLINK
int configfs_readlink(struct dentry *dentry, char __user *buffer, int buflen)
{
int error = 0;
@@ -304,7 +302,7 @@
struct inode_operations configfs_symlink_inode_operations = {
.follow_link = configfs_follow_link,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
+#ifndef HAVE_GENERIC_READLINK
.readlink = configfs_readlink,
#else
.readlink = generic_readlink,
More information about the Ocfs2-commits
mailing list