diff options
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/inode.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 2e10993fa966..4551cbd6bd43 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -178,64 +178,6 @@ const struct dentry_operations hfsplus_dentry_operations = { | |||
178 | .d_compare = hfsplus_compare_dentry, | 178 | .d_compare = hfsplus_compare_dentry, |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct dentry *hfsplus_file_lookup(struct inode *dir, | ||
182 | struct dentry *dentry, unsigned int flags) | ||
183 | { | ||
184 | struct hfs_find_data fd; | ||
185 | struct super_block *sb = dir->i_sb; | ||
186 | struct inode *inode = NULL; | ||
187 | struct hfsplus_inode_info *hip; | ||
188 | int err; | ||
189 | |||
190 | if (HFSPLUS_IS_RSRC(dir) || strcmp(dentry->d_name.name, "rsrc")) | ||
191 | goto out; | ||
192 | |||
193 | inode = HFSPLUS_I(dir)->rsrc_inode; | ||
194 | if (inode) | ||
195 | goto out; | ||
196 | |||
197 | inode = new_inode(sb); | ||
198 | if (!inode) | ||
199 | return ERR_PTR(-ENOMEM); | ||
200 | |||
201 | hip = HFSPLUS_I(inode); | ||
202 | inode->i_ino = dir->i_ino; | ||
203 | INIT_LIST_HEAD(&hip->open_dir_list); | ||
204 | mutex_init(&hip->extents_lock); | ||
205 | hip->extent_state = 0; | ||
206 | hip->flags = 0; | ||
207 | hip->userflags = 0; | ||
208 | set_bit(HFSPLUS_I_RSRC, &hip->flags); | ||
209 | |||
210 | err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | ||
211 | if (!err) { | ||
212 | err = hfsplus_find_cat(sb, dir->i_ino, &fd); | ||
213 | if (!err) | ||
214 | err = hfsplus_cat_read_inode(inode, &fd); | ||
215 | hfs_find_exit(&fd); | ||
216 | } | ||
217 | if (err) { | ||
218 | iput(inode); | ||
219 | return ERR_PTR(err); | ||
220 | } | ||
221 | hip->rsrc_inode = dir; | ||
222 | HFSPLUS_I(dir)->rsrc_inode = inode; | ||
223 | igrab(dir); | ||
224 | |||
225 | /* | ||
226 | * __mark_inode_dirty expects inodes to be hashed. Since we don't | ||
227 | * want resource fork inodes in the regular inode space, we make them | ||
228 | * appear hashed, but do not put on any lists. hlist_del() | ||
229 | * will work fine and require no locking. | ||
230 | */ | ||
231 | hlist_add_fake(&inode->i_hash); | ||
232 | |||
233 | mark_inode_dirty(inode); | ||
234 | out: | ||
235 | d_add(dentry, inode); | ||
236 | return NULL; | ||
237 | } | ||
238 | |||
239 | static void hfsplus_get_perms(struct inode *inode, | 181 | static void hfsplus_get_perms(struct inode *inode, |
240 | struct hfsplus_perm *perms, int dir) | 182 | struct hfsplus_perm *perms, int dir) |
241 | { | 183 | { |
@@ -385,7 +327,6 @@ int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end, | |||
385 | } | 327 | } |
386 | 328 | ||
387 | static const struct inode_operations hfsplus_file_inode_operations = { | 329 | static const struct inode_operations hfsplus_file_inode_operations = { |
388 | .lookup = hfsplus_file_lookup, | ||
389 | .setattr = hfsplus_setattr, | 330 | .setattr = hfsplus_setattr, |
390 | .setxattr = generic_setxattr, | 331 | .setxattr = generic_setxattr, |
391 | .getxattr = generic_getxattr, | 332 | .getxattr = generic_getxattr, |