diff options
| author | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
|---|---|---|
| committer | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
| commit | 5c34202b8bf942da411b6599668a76b07449bbfd (patch) | |
| tree | 5719c361321eaddc8e4f1b0c8a7994f0e9a6fdd3 /fs/pipe.c | |
| parent | 0d4804b31f91cfbcff6d62af0bc09a893a1c8ae0 (diff) | |
| parent | 1f8a6b658a943b4f04a1fc7b3a420360202c86cd (diff) | |
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/pipe.c')
| -rw-r--r-- | fs/pipe.c | 18 | 
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/pipe.c b/fs/pipe.c index ebafde7d6ab..3a89592bdf5 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -841,8 +841,18 @@ static int pipefs_delete_dentry(struct dentry *dentry)  	return 0;  } +/* + * pipefs_dname() is called from d_path(). + */ +static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen) +{ +	return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", +				dentry->d_inode->i_ino); +} +  static struct dentry_operations pipefs_dentry_operations = {  	.d_delete	= pipefs_delete_dentry, +	.d_dname	= pipefs_dname,  };  static struct inode * get_pipe_inode(void) @@ -888,8 +898,7 @@ struct file *create_write_pipe(void)  	struct inode *inode;  	struct file *f;  	struct dentry *dentry; -	char name[32]; -	struct qstr this; +	struct qstr name = { .name = "" };  	f = get_empty_filp();  	if (!f) @@ -899,11 +908,8 @@ struct file *create_write_pipe(void)  	if (!inode)  		goto err_file; -	this.len = sprintf(name, "[%lu]", inode->i_ino); -	this.name = name; -	this.hash = 0;  	err = -ENOMEM; -	dentry = d_alloc(pipe_mnt->mnt_sb->s_root, &this); +	dentry = d_alloc(pipe_mnt->mnt_sb->s_root, &name);  	if (!dentry)  		goto err_inode;  | 
