Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Al Viro 2a3d4047 723c2ba8

+9 -14
+9 -14
arch/s390/hypfs/inode.c
··· 311 311 struct hypfs_sb_info *sb_info = sb->s_fs_info; 312 312 313 313 hypfs_last_dentry = NULL; 314 - kill_litter_super(sb); 314 + kill_anon_super(sb); 315 315 kfree(sb_info); 316 316 } 317 317 ··· 321 321 struct dentry *dentry; 322 322 struct inode *inode; 323 323 324 - inode_lock(d_inode(parent)); 325 - dentry = lookup_noperm(&QSTR(name), parent); 326 - if (IS_ERR(dentry)) { 327 - dentry = ERR_PTR(-ENOMEM); 328 - goto fail; 329 - } 324 + dentry = simple_start_creating(parent, name); 325 + if (IS_ERR(dentry)) 326 + return ERR_PTR(-ENOMEM); 330 327 inode = hypfs_make_inode(parent->d_sb, mode); 331 328 if (!inode) { 332 - dput(dentry); 333 - dentry = ERR_PTR(-ENOMEM); 334 - goto fail; 329 + simple_done_creating(dentry); 330 + return ERR_PTR(-ENOMEM); 335 331 } 336 332 if (S_ISREG(mode)) { 337 333 inode->i_fop = &hypfs_file_ops; ··· 342 346 } else 343 347 BUG(); 344 348 inode->i_private = data; 345 - d_instantiate(dentry, inode); 346 - fail: 347 - inode_unlock(d_inode(parent)); 348 - return dentry; 349 + d_make_persistent(dentry, inode); 350 + simple_done_creating(dentry); 351 + return dentry; // borrowed 349 352 } 350 353 351 354 struct dentry *hypfs_mkdir(struct dentry *parent, const char *name)