mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Linux 4.9 compat: inode_change_ok() renamed setattr_prepare()
In torvalds/linux@31051c8 the inode_change_ok() function was renamed setattr_prepare() and updated to take a dentry ratheri than an inode. Update the code to call the setattr_prepare() and add a wrapper function which call inode_change_ok() for older kernels. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Requires-spl: refs/pull/581/head
This commit is contained in:
@@ -444,4 +444,15 @@ static inline void zfs_gid_write(struct inode *ip, gid_t gid)
|
||||
#define zpl_follow_up(path) follow_up(path)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 4.9 API change
|
||||
*/
|
||||
#ifndef HAVE_SETATTR_PREPARE
|
||||
static inline int
|
||||
setattr_prepare(struct dentry *dentry, struct iattr *ia)
|
||||
{
|
||||
return (inode_change_ok(dentry->d_inode, ia));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ZFS_VFS_H */
|
||||
|
||||
Reference in New Issue
Block a user