out_mount_failed: filemap_fdatawrite(sbi->direct_inode->i_mapping); filemap_fdatawait(sbi->direct_inode->i_mapping); truncate_inode_pages(sbi->direct_inode->i_mapping, 0); make_bad_inode(sbi->direct_inode); iput(sbi->direct_inode); sbi->direct_inode = NULL; 
static int jfs_fill_super(struct super_block *sb, void *data, int silent){	struct jfs_sb_info *sbi;	struct inode *inode;	int rc;	s64 newLVSize = 0;	int flag;	jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);	if (!new_valid_dev(sb->s_bdev->bd_dev))		return -EOVERFLOW;	sbi = kmalloc(sizeof (struct jfs_sb_info), GFP_KERNEL);	if (!sbi)		return -ENOSPC;	memset(sbi, 0, sizeof (struct jfs_sb_info));	sb->s_fs_info = sbi;	sbi->sb = sb;	/* initialize the mount flag and determine the default error handler */	flag = JFS_ERR_REMOUNT_RO;	if (!parse_options((char *) data, sb, &newLVSize, &flag)) {		kfree(sbi);		return -EINVAL;	}	sbi->flag = flag;#ifdef CONFIG_JFS_POSIX_ACL	sb->s_flags |= MS_POSIXACL;#endif	if (newLVSize) {		printk(KERN_ERR "resize option for remount only\n");		return -EINVAL;	}	/*	 * Initialize blocksize to 4K.	 */	sb_set_blocksize(sb, PSIZE);	/*	 * Set method vectors.	 */	sb->s_op = &jfs_super_operations;	sb->s_export_op = &jfs_export_operations;	rc = jfs_mount(sb);	if (rc) {		if (!silent) {			jfs_err("jfs_mount failed w/return code = %d", rc);		}		goto out_kfree;	}	if (sb->s_flags & MS_RDONLY)		sbi->log = NULL;	else {		rc = jfs_mount_rw(sb, 0);		if (rc) {			if (!silent) {				jfs_err("jfs_mount_rw failed, return code = %d",					rc);			}			goto out_no_rw;		}	}	sb->s_magic = JFS_SUPER_MAGIC;	inode = iget(sb, ROOT_I);	if (!inode || is_bad_inode(inode))		goto out_no_root;	sb->s_root = d_alloc_root(inode);	if (!sb->s_root)		goto out_no_root;	if (sbi->mntflag & JFS_OS2)		sb->s_root->d_op = &jfs_ci_dentry_operations;	/* logical blocks are represented by 40 bits in pxd_t, etc. */	sb->s_maxbytes = ((u64) sb->s_blocksize) << 40;#if BITS_PER_LONG == 32	/*	 * Page cache is indexed by long.	 * I would use MAX_LFS_FILESIZE, but it's only half as big	 */	sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, sb->s_maxbytes);#endif	sb->s_time_gran = 1;	return 0;out_no_root:	jfs_err("jfs_read_super: get root inode failed");	if (inode)		iput(inode);out_no_rw:	rc = jfs_umount(sb);	if (rc) {		jfs_err("jfs_umount failed with return code %d", rc);	}out_kfree:	if (sbi->nls_tab)		unload_nls(sbi->nls_tab);	kfree(sbi);	return -EINVAL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7fab479bebb96b1b4888bdae9b42e1fa9c5d3f38/super.c/buggy/fs/jfs/super.c