diff options
author | Jörg Thalheim <[email protected]> | 2015-02-07 13:41:01 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-03-16 10:39:45 -0700 |
commit | 157f14abf808d8862a4e81ab03c30a70f18b393a (patch) | |
tree | 341f7bd526bb72797b10f0dd65a287f26daf3364 /include/linux | |
parent | 1817cb6dc6f7226757d19ef6ec9108e8c8b0808f (diff) |
Linux 3.19 compat: file_inode was added
struct access f->f_dentry->d_inode was replaced by accessor function
file_inode(f)
Signed-off-by: Joerg Thalheim <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3084
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/vfs_compat.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index 37121b623..ddbf2fbbd 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -21,6 +21,7 @@ /* * Copyright (C) 2011 Lawrence Livermore National Security, LLC. + * Copyright (C) 2015 Jörg Thalheim. */ #ifndef _ZFS_VFS_H @@ -326,4 +327,16 @@ current_umask(void) #define zpl_inode_owner_or_capable(ip) is_owner_or_cap(ip) #endif /* HAVE_INODE_OWNER_OR_CAPABLE */ +/* + * 3.19 API change + * struct access f->f_dentry->d_inode was replaced by accessor function + * file_inode(f) + */ +#ifndef HAVE_FILE_INODE +static inline struct inode *file_inode(const struct file *f) +{ + return (f->f_dentry->d_inode); +} +#endif /* HAVE_FILE_INODE */ + #endif /* _ZFS_VFS_H */ |