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.
This commit is contained in:
Brian Behlendorf
2011-03-22 09:55:09 -07:00
parent 3517f0b7e9
commit bdf4328b04
51 changed files with 158 additions and 1 deletions
+1
View File
@@ -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 \
+16 -1
View File
@@ -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 */