X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fvfs_compat.h;h=c25cf44779435310bd87d64d02c3ea6cffd99fd1;hb=bdf4328b04544ac3759d689d0a68e514b6df1025;hp=bbc23a962f149f65441882447c6e804d5648fd20;hpb=7268e1bec8478639b7a1047e02ab931f30bc2f92;p=zfs.git diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index bbc23a9..c25cf44 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 */