diff options
author | Brian Behlendorf <[email protected]> | 2011-03-22 09:55:09 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-03-22 12:15:54 -0700 |
commit | bdf4328b04544ac3759d689d0a68e514b6df1025 (patch) | |
tree | 226f3aafe87b0a1844426ce9290cbdb3d07fbb08 /include/linux/vfs_compat.h | |
parent | 3517f0b7e928e1a8e7634828fb92d194ea35004d (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/linux/vfs_compat.h')
-rw-r--r-- | include/linux/vfs_compat.h | 17 |
1 files changed, 16 insertions, 1 deletions
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 */ |