Browse Source

ovl: don't fail copy-up if upper doesn't support xattr

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Miklos Szeredi 8 years ago
parent
commit
6266d465bd
1 changed files with 5 additions and 1 deletions
  1. 5 1
      fs/overlayfs/copy_up.c

+ 5 - 1
fs/overlayfs/copy_up.c

@@ -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;