Message ID | 20190508152509.13336-2-christian@brauner.io (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/2] fs: make all new mount api fds cloexec by default | expand |
On Wed, May 08, 2019 at 05:25:09PM +0200, Christian Brauner wrote: > Make the name of the anon inode fd "[fscontext]" instead of "fscontext". > This is minor but most core-kernel anon inode fds carry square brackets > around their name (cf. [1]). For the sake of consistency lets do the same This "(cf. [1])" reference was supposed to point to the list below. But since I rewrote the paragraph it can simply be dropped. Sorry for the oversight. Christian > for the mount api: > > [eventfd] > [eventpoll] > [fanotify] > [fscontext] > [io_uring] > [pidfd] > [signalfd] > [timerfd] > [userfaultfd] > > Signed-off-by: Christian Brauner <christian@brauner.io> > --- > fs/fsopen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/fsopen.c b/fs/fsopen.c > index a38fa8c616cf..83d0d2001bb2 100644 > --- a/fs/fsopen.c > +++ b/fs/fsopen.c > @@ -92,7 +92,7 @@ static int fscontext_create_fd(struct fs_context *fc) > { > int fd; > > - fd = anon_inode_getfd("fscontext", &fscontext_fops, fc, > + fd = anon_inode_getfd("[fscontext]", &fscontext_fops, fc, > O_RDWR | O_CLOEXEC); > if (fd < 0) > put_fs_context(fc); > -- > 2.21.0 >
On Thu, May 09, 2019 at 05:39:02PM +0200, Christian Brauner wrote: > On Wed, May 08, 2019 at 05:25:09PM +0200, Christian Brauner wrote: > > Make the name of the anon inode fd "[fscontext]" instead of "fscontext". > > This is minor but most core-kernel anon inode fds carry square brackets > > around their name (cf. [1]). For the sake of consistency lets do the same > > This "(cf. [1])" reference was supposed to point to the list below. But > since I rewrote the paragraph it can simply be dropped. Sorry for the > oversight. I'll resend with the commit message fixed up. Christian
diff --git a/fs/fsopen.c b/fs/fsopen.c index a38fa8c616cf..83d0d2001bb2 100644 --- a/fs/fsopen.c +++ b/fs/fsopen.c @@ -92,7 +92,7 @@ static int fscontext_create_fd(struct fs_context *fc) { int fd; - fd = anon_inode_getfd("fscontext", &fscontext_fops, fc, + fd = anon_inode_getfd("[fscontext]", &fscontext_fops, fc, O_RDWR | O_CLOEXEC); if (fd < 0) put_fs_context(fc);
Make the name of the anon inode fd "[fscontext]" instead of "fscontext". This is minor but most core-kernel anon inode fds carry square brackets around their name (cf. [1]). For the sake of consistency lets do the same for the mount api: [eventfd] [eventpoll] [fanotify] [fscontext] [io_uring] [pidfd] [signalfd] [timerfd] [userfaultfd] Signed-off-by: Christian Brauner <christian@brauner.io> --- fs/fsopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)