/* If the create succeeds, we fill in the inode information with d_instantiate().  */
static int ufs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
/* If the create succeeds, we fill in the inode information with d_instantiate().  */
static int ufs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
{
	struct inode *inode;
	int err;
	UFSD("BEGIN\n");
	inode = ufs_new_inode(dir, mode);
	err = PTR_ERR(inode);
	if (!IS_ERR(inode)) {
		inode->i_op = &ufs_file_inode_operations;
		inode->i_fop = &ufs_file_operations;
		inode->i_mapping->a_ops = &ufs_aops;
		mark_inode_dirty(inode);
		lock_kernel();
		err = ufs_add_nondir(dentry, inode);
		unlock_kernel();
	}
	UFSD("END: err=%d\n", err);
	return err;
}