aboutsummaryrefslogtreecommitdiffstats
path: root/fs/efs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/efs/namei.c')
-rw-r--r--fs/efs/namei.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/efs/namei.c b/fs/efs/namei.c
index c3fb5f9c4a44..1511bf9e5f80 100644
--- a/fs/efs/namei.c
+++ b/fs/efs/namei.c
@@ -8,7 +8,6 @@
8 8
9#include <linux/buffer_head.h> 9#include <linux/buffer_head.h>
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/smp_lock.h>
12#include <linux/exportfs.h> 11#include <linux/exportfs.h>
13#include "efs.h" 12#include "efs.h"
14 13
@@ -63,16 +62,12 @@ struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, struct namei
63 efs_ino_t inodenum; 62 efs_ino_t inodenum;
64 struct inode * inode = NULL; 63 struct inode * inode = NULL;
65 64
66 lock_kernel();
67 inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len); 65 inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len);
68 if (inodenum) { 66 if (inodenum) {
69 inode = efs_iget(dir->i_sb, inodenum); 67 inode = efs_iget(dir->i_sb, inodenum);
70 if (IS_ERR(inode)) { 68 if (IS_ERR(inode))
71 unlock_kernel();
72 return ERR_CAST(inode); 69 return ERR_CAST(inode);
73 }
74 } 70 }
75 unlock_kernel();
76 71
77 return d_splice_alias(inode, dentry); 72 return d_splice_alias(inode, dentry);
78} 73}
@@ -115,11 +110,9 @@ struct dentry *efs_get_parent(struct dentry *child)
115 struct dentry *parent = ERR_PTR(-ENOENT); 110 struct dentry *parent = ERR_PTR(-ENOENT);
116 efs_ino_t ino; 111 efs_ino_t ino;
117 112
118 lock_kernel();
119 ino = efs_find_entry(child->d_inode, "..", 2); 113 ino = efs_find_entry(child->d_inode, "..", 2);
120 if (ino) 114 if (ino)
121 parent = d_obtain_alias(efs_iget(child->d_inode->i_sb, ino)); 115 parent = d_obtain_alias(efs_iget(child->d_inode->i_sb, ino));
122 unlock_kernel();
123 116
124 return parent; 117 return parent;
125} 118}