]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
idmapped-mounts: account for EOVERFLOW
authorChristian Brauner <brauner@kernel.org>
Tue, 20 Sep 2022 08:35:22 +0000 (10:35 +0200)
committerZorro Lang <zlang@kernel.org>
Wed, 21 Sep 2022 01:40:22 +0000 (09:40 +0800)
We introduced a new type vfs{g,u}id_t into the vfs in b27c82e12965
("attr: port attribute changes to new types"). This type makes sure that
{g,u}ids mapped into an idmapped mount are distinct from regular
k{g,u}id_t. This expands the possible errnos that users may see so we
need to handle both EINVAL and EOVERFLOW.

Cc: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/vfs/idmapped-mounts.c

index c010dfa1322e451174daf7a164d7109c2f22f05b..ed7948b6b7f5b9440785f96653f3cd36e7cee7b1 100644 (file)
@@ -7367,7 +7367,7 @@ static int setattr_fix_968219708108(const struct vfstest_info *info)
                 */
                if (!fchownat(open_tree_fd, FILE1, 0, 0, AT_SYMLINK_NOFOLLOW))
                        die("failure: change ownership");
-               if (errno != EINVAL)
+               if (errno != EINVAL && errno != EOVERFLOW)
                        die("failure: errno");
 
                /*
@@ -7457,7 +7457,7 @@ static int setattr_fix_968219708108(const struct vfstest_info *info)
                 */
                if (!fchownat(open_tree_fd, FILE1, 0, 0, AT_SYMLINK_NOFOLLOW))
                        die("failure: change ownership");
-               if (errno != EINVAL)
+               if (errno != EINVAL && errno != EOVERFLOW)
                        die("failure: errno");
 
                /*