aboutsummaryrefslogtreecommitdiffstats
path: root/fs/efs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/efs/inode.c')
-rw-r--r--fs/efs/inode.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index 174696f9bf14..627c3026946d 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -45,17 +45,26 @@ static inline void extent_copy(efs_extent *src, efs_extent *dst) {
45 return; 45 return;
46} 46}
47 47
48void efs_read_inode(struct inode *inode) 48struct inode *efs_iget(struct super_block *super, unsigned long ino)
49{ 49{
50 int i, inode_index; 50 int i, inode_index;
51 dev_t device; 51 dev_t device;
52 u32 rdev; 52 u32 rdev;
53 struct buffer_head *bh; 53 struct buffer_head *bh;
54 struct efs_sb_info *sb = SUPER_INFO(inode->i_sb); 54 struct efs_sb_info *sb = SUPER_INFO(super);
55 struct efs_inode_info *in = INODE_INFO(inode); 55 struct efs_inode_info *in;
56 efs_block_t block, offset; 56 efs_block_t block, offset;
57 struct efs_dinode *efs_inode; 57 struct efs_dinode *efs_inode;
58 58 struct inode *inode;
59
60 inode = iget_locked(super, ino);
61 if (IS_ERR(inode))
62 return ERR_PTR(-ENOMEM);
63 if (!(inode->i_state & I_NEW))
64 return inode;
65
66 in = INODE_INFO(inode);
67
59 /* 68 /*
60 ** EFS layout: 69 ** EFS layout:
61 ** 70 **
@@ -159,13 +168,13 @@ void efs_read_inode(struct inode *inode)
159 break; 168 break;
160 } 169 }
161 170
162 return; 171 unlock_new_inode(inode);
172 return inode;
163 173
164read_inode_error: 174read_inode_error:
165 printk(KERN_WARNING "EFS: failed to read inode %lu\n", inode->i_ino); 175 printk(KERN_WARNING "EFS: failed to read inode %lu\n", inode->i_ino);
166 make_bad_inode(inode); 176 iget_failed(inode);
167 177 return ERR_PTR(-EIO);
168 return;
169} 178}
170 179
171static inline efs_block_t 180static inline efs_block_t