Commit 2a3d4047 authored by Al Viro's avatar Al Viro
Browse files

convert hypfs



just have hypfs_create_file() do the usual simple_start_creating()/
d_make_persistent()/simple_done_creating() and that's it

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 723c2ba8
Loading
Loading
Loading
Loading
+9 −14
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ static void hypfs_kill_super(struct super_block *sb)
	struct hypfs_sb_info *sb_info = sb->s_fs_info;

	hypfs_last_dentry = NULL;
	kill_litter_super(sb);
	kill_anon_super(sb);
	kfree(sb_info);
}

@@ -321,17 +321,13 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name,
	struct dentry *dentry;
	struct inode *inode;

	inode_lock(d_inode(parent));
	dentry = lookup_noperm(&QSTR(name), parent);
	if (IS_ERR(dentry)) {
		dentry = ERR_PTR(-ENOMEM);
		goto fail;
	}
	dentry = simple_start_creating(parent, name);
	if (IS_ERR(dentry))
		return ERR_PTR(-ENOMEM);
	inode = hypfs_make_inode(parent->d_sb, mode);
	if (!inode) {
		dput(dentry);
		dentry = ERR_PTR(-ENOMEM);
		goto fail;
		simple_done_creating(dentry);
		return ERR_PTR(-ENOMEM);
	}
	if (S_ISREG(mode)) {
		inode->i_fop = &hypfs_file_ops;
@@ -346,10 +342,9 @@ static struct dentry *hypfs_create_file(struct dentry *parent, const char *name,
	} else
		BUG();
	inode->i_private = data;
	d_instantiate(dentry, inode);
fail:
	inode_unlock(d_inode(parent));
	return dentry;
	d_make_persistent(dentry, inode);
	simple_done_creating(dentry);
	return dentry;	 // borrowed
}

struct dentry *hypfs_mkdir(struct dentry *parent, const char *name)