Proxmox VE kernel compat, invalidate_inodes()

The Proxmox VE kernel contains a patch which renames the function
invalidate_inodes() to invalidate_inodes_check().  In the process
it adds a 'check' argument and a '#define invalidate_inodes(x)'
compatibility wrapper for legacy callers.  Therefore, if either
of these functions are exported invalidate_inodes() can be
safely used.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #58
This commit is contained in:
Brian Behlendorf
2011-12-21 14:22:45 -08:00
parent cd2817f8a6
commit 5f6c14b1ed
5 changed files with 100 additions and 6 deletions
+2 -2
View File
@@ -54,7 +54,7 @@
* As for 2.6.39 invalidate_inodes() was updated to take a second
* argument which controls how dirty inodes should be handled.
*/
#ifdef HAVE_INVALIDATE_INODES
#if defined(HAVE_INVALIDATE_INODES) || defined(HAVE_INVALIDATE_INODES_CHECK)
# ifdef HAVE_2ARGS_INVALIDATE_INODES
# define spl_invalidate_inodes(sb, kd) invalidate_inodes(sb, kd)
# else
@@ -70,7 +70,7 @@ typedef int (*invalidate_inodes_t)(struct super_block *sb);
extern invalidate_inodes_t invalidate_inodes_fn;
# define spl_invalidate_inodes(sb, kd) invalidate_inodes_fn(sb)
# endif /* HAVE_2ARGS_INVALIDATE_INODES */
#endif /* HAVE_INVALIDATE_INODES */
#endif /* HAVE_INVALIDATE_INODES || HAVE_INVALIDATE_INODES_CHECK */
#if !defined(HAVE_SHRINK_CONTROL_STRUCT)
struct shrink_control {