diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-09 15:55:34 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-11-17 23:59:27 -0500 |
| commit | 2a3d40476b9f77912100fdcd93d155a9675c3d05 (patch) | |
| tree | b1fbb7d00887d8571dbd73bdc8f7c4a0bc48081a | |
| parent | 723c2ba85900cf00f79cab4713d75dedd8e094df (diff) | |
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: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | arch/s390/hypfs/inode.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 6a80ab2692be..98952543d593 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c @@ -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) |
