uapi, fsopen: use square brackets around "fscontext" [ver #2]
authorChristian Brauner <christian@brauner.io>
Thu, 16 May 2019 11:52:20 +0000 (12:52 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 16 May 2019 16:23:45 +0000 (12:23 -0400)
Make the name of the anon inode fd "[fscontext]" instead of "fscontext".
This is minor but most core-kernel anon inode fds already carry square
brackets around their name:

[eventfd]
[eventpoll]
[fanotify]
[io_uring]
[pidfd]
[signalfd]
[timerfd]
[userfaultfd]

For the sake of consistency lets do the same for the fscontext anon inode
fd that comes with the new mount api.

Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fsopen.c

index 3bb9c0c8cbcc2f6d8ede5ccad01ca1bb903ad418..c2891e933ef17e2fe326bc3eef2a11cb4c982cd3 100644 (file)
@@ -92,7 +92,7 @@ static int fscontext_create_fd(struct fs_context *fc, unsigned int o_flags)
 {
        int fd;
 
-       fd = anon_inode_getfd("fscontext", &fscontext_fops, fc,
+       fd = anon_inode_getfd("[fscontext]", &fscontext_fops, fc,
                              O_RDWR | o_flags);
        if (fd < 0)
                put_fs_context(fc);