浏览代码

switch hfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 14 年之前
父节点
当前提交
518c79d28e
共有 2 个文件被更改,包括 1 次插入4 次删除
  1. 0 2
      fs/hfs/dir.c
  2. 1 2
      fs/hfs/super.c

+ 0 - 2
fs/hfs/dir.c

@@ -25,8 +25,6 @@ static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
 	struct inode *inode = NULL;
 	struct inode *inode = NULL;
 	int res;
 	int res;
 
 
-	d_set_d_op(dentry, &hfs_dentry_operations);
-
 	hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd);
 	hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd);
 	hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name);
 	hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name);
 	res = hfs_brec_read(&fd, &rec, sizeof(rec));
 	res = hfs_brec_read(&fd, &rec, sizeof(rec));

+ 1 - 2
fs/hfs/super.c

@@ -429,13 +429,12 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
 	if (!root_inode)
 	if (!root_inode)
 		goto bail_no_root;
 		goto bail_no_root;
 
 
+	sb->s_d_op = &hfs_dentry_operations;
 	res = -ENOMEM;
 	res = -ENOMEM;
 	sb->s_root = d_alloc_root(root_inode);
 	sb->s_root = d_alloc_root(root_inode);
 	if (!sb->s_root)
 	if (!sb->s_root)
 		goto bail_iput;
 		goto bail_iput;
 
 
-	d_set_d_op(sb->s_root, &hfs_dentry_operations);
-
 	/* everything's okay */
 	/* everything's okay */
 	return 0;
 	return 0;