Starting with Linux 4.9-rc1 the rename2 inode operation has
replaced the rename op, so filesystem rename implementations
require an extra flags argument. Add the argument to fix the
FTBFS with Linux 4.9, but since aufs doesn't support any of the
flags return an error if it is non-zero.
Fixes FTBFS with 4.9 kernels.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
/* ---------------------------------------------------------------------- */
int aufs_rename(struct inode *_src_dir, struct dentry *_src_dentry,
- struct inode *_dst_dir, struct dentry *_dst_dentry)
+ struct inode *_dst_dir, struct dentry *_dst_dentry,
+ unsigned int rename_flags)
{
int err, flags;
/* reduce stack space */
IMustLock(_src_dir);
IMustLock(_dst_dir);
+ err = -EINVAL;
+ if (rename_flags)
+ goto out;
+
err = -ENOMEM;
BUILD_BUG_ON(sizeof(*a) > PAGE_SIZE);
a = kzalloc(sizeof(*a), GFP_NOFS);
/* i_op_ren.c */
int au_wbr(struct dentry *dentry, aufs_bindex_t btgt);
int aufs_rename(struct inode *src_dir, struct dentry *src_dentry,
- struct inode *dir, struct dentry *dentry);
+ struct inode *dir, struct dentry *dentry,
+ unsigned int rename_flags);
/* iinfo.c */
struct inode *au_h_iptr(struct inode *inode, aufs_bindex_t bindex);