summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-03-22 09:55:09 -0700
committerBrian Behlendorf <[email protected]>2011-03-22 12:15:54 -0700
commitbdf4328b04544ac3759d689d0a68e514b6df1025 (patch)
tree226f3aafe87b0a1844426ce9290cbdb3d07fbb08 /include
parent3517f0b7e928e1a8e7634828fb92d194ea35004d (diff)
Linux 2.6.28 compat, insert_inode_locked()
Added insert_inode_locked() helper function, prior to this most callers used insert_inode_hash(). The older method doesn't check for collisions in the inode_hashtable but it still acceptible for use. Fallback to using insert_inode_hash() when insert_inode_locked() is unavailable.
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.in1
-rw-r--r--include/linux/Makefile.in1
-rw-r--r--include/linux/vfs_compat.h17
-rw-r--r--include/sys/Makefile.in1
-rw-r--r--include/sys/fm/Makefile.in1
-rw-r--r--include/sys/fm/fs/Makefile.in1
-rw-r--r--include/sys/fs/Makefile.in1
7 files changed, 22 insertions, 1 deletions
diff --git a/include/Makefile.in b/include/Makefile.in
index 70c577b8f..cfaf47930 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in
index 741a35a33..531ce3612 100644
--- a/include/linux/Makefile.in
+++ b/include/linux/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h
index bbc23a962..c25cf4477 100644
--- a/include/linux/vfs_compat.h
+++ b/include/linux/vfs_compat.h
@@ -37,6 +37,21 @@
#else
#define ZPL_FSYNC_PROTO(fn, x, y, z) static int fn(struct file *x, \
struct dentry *y, int z)
-#endif
+#endif /* HAVE_2ARGS_FSYNC */
+
+/*
+ * 2.6.28 API change,
+ * Added insert_inode_locked() helper function, prior to this most callers
+ * used insert_inode_hash(). The older method doesn't check for collisions
+ * in the inode_hashtable but it still acceptible for use.
+ */
+#ifndef HAVE_INSERT_INODE_LOCKED
+static inline int
+insert_inode_locked(struct inode *ip)
+{
+ insert_inode_hash(ip);
+ return (0);
+}
+#endif /* HAVE_INSERT_INODE_LOCKED */
#endif /* _ZFS_VFS_H */
diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in
index 9123b645b..fe0c98ad5 100644
--- a/include/sys/Makefile.in
+++ b/include/sys/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in
index adbb31b82..29b215dc1 100644
--- a/include/sys/fm/Makefile.in
+++ b/include/sys/fm/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in
index 69ca1f383..ca7bc3081 100644
--- a/include/sys/fm/fs/Makefile.in
+++ b/include/sys/fm/fs/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in
index da8c57eb6..bebbce985 100644
--- a/include/sys/fs/Makefile.in
+++ b/include/sys/fs/Makefile.in
@@ -57,6 +57,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-fmode-t.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
+ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \