aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/inode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index b32ce53d24ee..9f73797f95a6 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -190,7 +190,7 @@ static const struct file_operations pstore_file_operations = {
190 */ 190 */
191static int pstore_unlink(struct inode *dir, struct dentry *dentry) 191static int pstore_unlink(struct inode *dir, struct dentry *dentry)
192{ 192{
193 struct pstore_private *p = dentry->d_inode->i_private; 193 struct pstore_private *p = d_inode(dentry)->i_private;
194 int err; 194 int err;
195 195
196 err = pstore_check_syslog_permissions(p); 196 err = pstore_check_syslog_permissions(p);
@@ -199,7 +199,7 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry)
199 199
200 if (p->psi->erase) 200 if (p->psi->erase)
201 p->psi->erase(p->type, p->id, p->count, 201 p->psi->erase(p->type, p->id, p->count,
202 dentry->d_inode->i_ctime, p->psi); 202 d_inode(dentry)->i_ctime, p->psi);
203 else 203 else
204 return -EPERM; 204 return -EPERM;
205 205
@@ -373,7 +373,7 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
373 break; 373 break;
374 } 374 }
375 375
376 mutex_lock(&root->d_inode->i_mutex); 376 mutex_lock(&d_inode(root)->i_mutex);
377 377
378 dentry = d_alloc_name(root, name); 378 dentry = d_alloc_name(root, name);
379 if (!dentry) 379 if (!dentry)
@@ -393,12 +393,12 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
393 list_add(&private->list, &allpstore); 393 list_add(&private->list, &allpstore);
394 spin_unlock_irqrestore(&allpstore_lock, flags); 394 spin_unlock_irqrestore(&allpstore_lock, flags);
395 395
396 mutex_unlock(&root->d_inode->i_mutex); 396 mutex_unlock(&d_inode(root)->i_mutex);
397 397
398 return 0; 398 return 0;
399 399
400fail_lockedalloc: 400fail_lockedalloc:
401 mutex_unlock(&root->d_inode->i_mutex); 401 mutex_unlock(&d_inode(root)->i_mutex);
402 kfree(private); 402 kfree(private);
403fail_alloc: 403fail_alloc:
404 iput(inode); 404 iput(inode);