Commit b9aff027 authored by Nick Piggin's avatar Nick Piggin Committed by Al Viro

fs: anon_inodes implement dname

Add a d_dname method for anon_inodes filesystem, the same way pipefs and
sockfs pseudo filesystems.  This allows us to remove the DCACHE_UNHASHED
hack from anon_inodes.c (see next patch).

[AV: inumber is useless here, dropped from anon_inodefs_dname()]
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 06777d30
...@@ -45,6 +45,15 @@ static int anon_inodefs_delete_dentry(struct dentry *dentry) ...@@ -45,6 +45,15 @@ static int anon_inodefs_delete_dentry(struct dentry *dentry)
return 1; return 1;
} }
/*
* anon_inodefs_dname() is called from d_path().
*/
static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
{
return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s",
dentry->d_name.name);
}
static struct file_system_type anon_inode_fs_type = { static struct file_system_type anon_inode_fs_type = {
.name = "anon_inodefs", .name = "anon_inodefs",
.get_sb = anon_inodefs_get_sb, .get_sb = anon_inodefs_get_sb,
...@@ -52,6 +61,7 @@ static struct file_system_type anon_inode_fs_type = { ...@@ -52,6 +61,7 @@ static struct file_system_type anon_inode_fs_type = {
}; };
static const struct dentry_operations anon_inodefs_dentry_operations = { static const struct dentry_operations anon_inodefs_dentry_operations = {
.d_delete = anon_inodefs_delete_dentry, .d_delete = anon_inodefs_delete_dentry,
.d_dname = anon_inodefs_dname,
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment