Re: [PATCH 06/10] fsmount.2: document 'new' mount api
From: Askar Safin <hidden>
Date: 2025-08-06 12:05:14
From: Askar Safin <hidden>
Date: 2025-08-06 12:05:14
The resultant file descriptor acts the same as one produced by open(2) with O_PATH, meaning it can also be used as a dirfd argument to other "*at()" system calls.
This may be interpreted by somebody that fsmount returns exactly same fd as open(2) with O_PATH returns. This is not true, because, for example, you can use move_mount with fd, returned by fsmount, but cannot use move_mount with fd, returned by open with O_PATH. So, please replace "acts the same as one" with "can be used as one" or something. Also, please, replace 'to other "*at()"' with 'to "*at()"'. No at-syscalls were mentioned in this paragraph before, so "other" is not needed here.
/* Create a new file without attaching the mount object. */ int tmpfd = openat(sfd, "tmpfile", O_CREAT | O_EXCL | O_RDWR, 0600); unlinkat(sfd, "tmpfile", 0);
You meant mfd here, not sfd. -- Askar Safin