Re: [PATCH v3 1/5] idmapped-mounts: Reset errno to zero after detect fs_allow_idmap

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Hi Zorro

Since  Christian doesn't send  a new patchset(for rename idmap-mount)
based on lastest xfstests, should I send a v4 patch for the following
patches today?
"idmapped-mounts: Reset errno to zero after detect fs_allow_idmap"
" idmapped-mounts: Add mknodat operation in setgid test"
"idmapped-mounts: Add open with O_TMPFILE operation in setgid test"

So you can merge these three patches if you plan to announce a new
xfstests version in this weekend.

What do you think about it?

Best Regards
Yang Xu
> If we run case on old kernel that doesn't support mount_setattr and
> then fail on our own function before call is_setgid/is_setuid function
> to reset errno, run_test will print "Function not implement" error.
> 
> Signed-off-by: Yang Xu<xuyang2018.jy@xxxxxxxxxxx>
> ---
>   src/idmapped-mounts/idmapped-mounts.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c
> index 4cf6c3bb..8e6405c5 100644
> --- a/src/idmapped-mounts/idmapped-mounts.c
> +++ b/src/idmapped-mounts/idmapped-mounts.c
> @@ -14070,6 +14070,8 @@ int main(int argc, char *argv[])
>   		die("failed to open %s", t_mountpoint_scratch);
> 
>   	t_fs_allow_idmap = fs_allow_idmap();
> +	/* don't copy ENOSYS errno to child process on older kernel */
> +	errno = 0;
>   	if (supported) {
>   		/*
>   		 * Caller just wants to know whether the filesystem we're on




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux