[LTP] [PATCH v5 7/7] Add file_attr04 test

Cyril Hrubis chrubis@suse.cz
Wed Aug 6 16:30:47 CEST 2025


Hi!
> Just curious, does the fd from open_tree() work fine as dirfd or do we
> just get differnt errno? I think second one may be the case, since the
> file descriptor from open_tree() syscall usually behaves a bit strange.

Looks like kernel internally does:

return dentry_open(&path, O_PATH, current_cred());

So I suppose that the fd from open_tree() is actually usable as a dirfd.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list