diff options
| author | Nick Piggin <npiggin@suse.de> | 2009-11-20 17:28:35 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-17 10:48:12 -0500 |
| commit | b9aff027b2c1d6019d237382c78fd396f9de2ea5 (patch) | |
| tree | b1a136f50d725d5744ac5b9dbc01e66226ce512f | |
| parent | 06777d308f8f9ddb67798d34bf193101a4bdf06c (diff) | |
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: Nick 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | fs/anon_inodes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 94f5110c4655..01c529a3f7d2 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c | |||
| @@ -45,6 +45,15 @@ static int anon_inodefs_delete_dentry(struct dentry *dentry) | |||
| 45 | return 1; | 45 | return 1; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * anon_inodefs_dname() is called from d_path(). | ||
| 50 | */ | ||
| 51 | static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen) | ||
| 52 | { | ||
| 53 | return dynamic_dname(dentry, buffer, buflen, "anon_inode:%s", | ||
| 54 | dentry->d_name.name); | ||
| 55 | } | ||
| 56 | |||
| 48 | static struct file_system_type anon_inode_fs_type = { | 57 | static struct file_system_type anon_inode_fs_type = { |
| 49 | .name = "anon_inodefs", | 58 | .name = "anon_inodefs", |
| 50 | .get_sb = anon_inodefs_get_sb, | 59 | .get_sb = anon_inodefs_get_sb, |
| @@ -52,6 +61,7 @@ static struct file_system_type anon_inode_fs_type = { | |||
| 52 | }; | 61 | }; |
| 53 | static const struct dentry_operations anon_inodefs_dentry_operations = { | 62 | static const struct dentry_operations anon_inodefs_dentry_operations = { |
| 54 | .d_delete = anon_inodefs_delete_dentry, | 63 | .d_delete = anon_inodefs_delete_dentry, |
| 64 | .d_dname = anon_inodefs_dname, | ||
| 55 | }; | 65 | }; |
| 56 | 66 | ||
| 57 | /* | 67 | /* |
