]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: aufs -- Add flags argument to aufs_rename()
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 6 Dec 2016 15:51:01 +0000 (09:51 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
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>
fs/aufs/i_op_ren.c
fs/aufs/inode.h

index 200b4d547240bee2003dc4a87976b7200c3e6b42..8c763590aec1b35de9377653d5c7e054945db9ca 100644 (file)
@@ -802,7 +802,8 @@ static void au_ren_rev_dt(int err, struct au_ren_args *a)
 /* ---------------------------------------------------------------------- */
 
 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 */
@@ -812,6 +813,10 @@ int aufs_rename(struct inode *_src_dir, struct dentry *_src_dentry,
        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);
index 94d217ff609a5dd9b67ac771536b31b807e9f09f..70b4ea8f815fa190d92a05659d149341b96d6613 100644 (file)
@@ -238,7 +238,8 @@ int aufs_rmdir(struct inode *dir, struct dentry *dentry);
 /* 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);