ovl: don't fail copy-up if upper doesn't support xattr
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 18 May 2017 14:11:24 +0000 (16:11 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 18 May 2017 14:11:24 +0000 (16:11 +0200)
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/copy_up.c

index 061a8448e6c438252c4134c3448f295f303bfeeb..f92ab35d43a6679f3046ebdf227d7a61b40f0b1b 100644 (file)
@@ -300,7 +300,11 @@ static int ovl_set_origin(struct dentry *dentry, struct dentry *lower,
                        return PTR_ERR(fh);
        }
 
-       err = ovl_do_setxattr(upper, OVL_XATTR_ORIGIN, fh, fh ? fh->len : 0, 0);
+       /*
+        * Do not fail when upper doesn't support xattrs.
+        */
+       err = ovl_check_setxattr(dentry, upper, OVL_XATTR_ORIGIN, fh,
+                                fh ? fh->len : 0, 0);
        kfree(fh);
 
        return err;