]> git.proxmox.com Git - mirror_spl.git/blobdiff - include/linux/file_compat.h
Linux 3.1 compat, kern_path_parent()
[mirror_spl.git] / include / linux / file_compat.h
index 97bd7639610b05ac299fa3bb9d8ecbdf518f34c5..d5fb2bc608cc57268b57d7b9aca815e4cfabae9d 100644 (file)
@@ -67,11 +67,17 @@ spl_filp_open(const char *name, int flags, int mode, int *err)
 #define spl_inode_unlock(ip)           (up(&(ip)->i_sem))
 #endif /* HAVE_INODE_I_MUTEX */
 
-#ifdef HAVE_KERN_PATH_PARENT
-#define spl_kern_path_parent(path, nd) kern_path_parent(path, nd)
+#ifdef HAVE_KERN_PATH_PARENT_HEADER
+# ifndef HAVE_KERN_PATH_PARENT_SYMBOL
+typedef int (*kern_path_parent_t)(const char *, struct nameidata *);
+extern kern_path_parent_t kern_path_parent_fn;
+#  define spl_kern_path_parent(path, nd)       kern_path_parent_fn(path, nd)
+# else
+#  define spl_kern_path_parent(path, nd)       kern_path_parent(path, nd)
+# endif /* HAVE_KERN_PATH_PARENT_SYMBOL */
 #else
-#define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd)
-#endif /* HAVE_KERN_PATH_PARENT */
+# define spl_kern_path_parent(path, nd)        path_lookup(path, LOOKUP_PARENT, nd)
+#endif /* HAVE_KERN_PATH_PARENT_HEADER */
 
 #endif /* SPL_FILE_COMPAT_H */