diff options
| author | James Morris <jmorris@redhat.com> | 2004-10-25 04:14:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-25 04:14:02 -0700 |
| commit | e7ddba032a9efac9f865b7836e070bea6aec1ecc (patch) | |
| tree | b79c8ede804f3747766863c5f25ca41fe20cd758 /drivers/misc/ibmasm/ibmasmfs.c | |
| parent | e9eef9fed769a1fd5cf91128767b06668dd6cd29 (diff) | |
[PATCH] Add d_alloc_name() to libfs
This patch consolidates several occurrences of duplicated code into a new
libfs function d_alloc_name().
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/misc/ibmasm/ibmasmfs.c')
| -rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index cdacb25d9a86..02f4f789c6f4 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c @@ -173,13 +173,8 @@ static struct dentry *ibmasmfs_create_file (struct super_block *sb, { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; @@ -202,12 +197,8 @@ static struct dentry *ibmasmfs_create_dir (struct super_block *sb, { struct dentry *dentry; struct inode *inode; - struct qstr qname; - qname.name = name; - qname.len = strlen (name); - qname.hash = full_name_hash(name, qname.len); - dentry = d_alloc(parent, &qname); + dentry = d_alloc_name(parent, name); if (!dentry) return NULL; |
