diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 599b233bef75..5246285a95fb 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2200,7 +2200,7 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2200 | { | 2200 | { |
2201 | struct file *file; | 2201 | struct file *file; |
2202 | struct inode *inode; | 2202 | struct inode *inode; |
2203 | struct dentry *dentry; | 2203 | struct path path; |
2204 | char name[32]; | 2204 | char name[32]; |
2205 | struct qstr this; | 2205 | struct qstr this; |
2206 | 2206 | ||
@@ -2225,18 +2225,19 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2225 | /* | 2225 | /* |
2226 | * allocate a new dcache entry | 2226 | * allocate a new dcache entry |
2227 | */ | 2227 | */ |
2228 | dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2228 | path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2229 | if (!dentry) { | 2229 | if (!path.dentry) { |
2230 | iput(inode); | 2230 | iput(inode); |
2231 | return ERR_PTR(-ENOMEM); | 2231 | return ERR_PTR(-ENOMEM); |
2232 | } | 2232 | } |
2233 | path.mnt = mntget(pfmfs_mnt); | ||
2233 | 2234 | ||
2234 | dentry->d_op = &pfmfs_dentry_operations; | 2235 | path.dentry->d_op = &pfmfs_dentry_operations; |
2235 | d_add(dentry, inode); | 2236 | d_add(path.dentry, inode); |
2236 | 2237 | ||
2237 | file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops); | 2238 | file = alloc_file(&path, FMODE_READ, &pfm_file_ops); |
2238 | if (!file) { | 2239 | if (!file) { |
2239 | dput(dentry); | 2240 | path_put(&path); |
2240 | return ERR_PTR(-ENFILE); | 2241 | return ERR_PTR(-ENFILE); |
2241 | } | 2242 | } |
2242 | 2243 | ||