Skip to content

Commit

Permalink
fs: anon_inodes implement dname
Browse files Browse the repository at this point in the history
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: Nick Piggin <[email protected]>
Cc: Miklos Szeredi <[email protected]>
Cc: Davide Libenzi <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Nick Piggin authored and Al Viro committed Dec 17, 2009
1 parent 06777d3 commit b9aff02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/anon_inodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,23 @@ static int anon_inodefs_delete_dentry(struct dentry *dentry)
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 = {
.name = "anon_inodefs",
.get_sb = anon_inodefs_get_sb,
.kill_sb = kill_anon_super,
};
static const struct dentry_operations anon_inodefs_dentry_operations = {
.d_delete = anon_inodefs_delete_dentry,
.d_dname = anon_inodefs_dname,
};

/*
Expand Down

0 comments on commit b9aff02

Please sign in to comment.