When a metacopy file is no longer a metacopy and data has been copied up, remove REDIRECT xattr. Its not needed anymore. Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx> --- fs/overlayfs/copy_up.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index 0c8d2755bd25..704febd2e2fa 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -775,6 +775,15 @@ static int ovl_copy_up_meta_inode_data(struct ovl_copy_up_ctx *c) if (err) return err; + /* + * A metacopy files does not need redirect xattr once data has + * been copied up. + */ + err = vfs_removexattr(upperpath.dentry, OVL_XATTR_REDIRECT); + if (err && err != -ENODATA && err != -EOPNOTSUPP) + return err; + + err = 0; ovl_set_upperdata(d_inode(c->dentry)); return err; } -- 2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html