diff mbox series

[v2,2/2] fsopen: use square brackets around "fscontext"

Message ID 20190509155801.8369-2-christian@brauner.io (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] fs: make all new mount api fds cloexec by default | expand

Commit Message

Christian Brauner May 9, 2019, 3:58 p.m. UTC
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>
---
v1: patch not present
v2:
- David Howells <dhowells@redhat.com>:
  - remove unneeded reference from commit message and split paragraph to
    place list of anon inode fds in between
---
 fs/fsopen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Howells May 11, 2019, 8:40 a.m. UTC | #1
Christian Brauner <christian@brauner.io> wrote:

> 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>

Reviewed-by: David Howells <dhowells@redhat.com>
diff mbox series

Patch

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);