goal = 0;
-repeat:
tmp = ufs_data_ptr_to_cpu(sb, p);
lastfrag = ufsi->i_lastfrag;
if (tmp && fragment < lastfrag) {
if (!phys) {
- result = sb_getblk(sb, uspi->s_sbbase + tmp + blockoff);
- if (tmp == ufs_data_ptr_to_cpu(sb, p)) {
- UFSD("EXIT, result %llu\n",
- (unsigned long long)tmp + blockoff);
- return result;
- }
- brelse (result);
- goto repeat;
+ return sb_getblk(sb, uspi->s_sbbase + tmp + blockoff);
} else {
*phys = uspi->s_sbbase + tmp + blockoff;
return NULL;
ufs_data_ptr_to_cpu(sb, p2),
uspi->s_fpb - lastblockoff,
err, locked_page);
- if (!tmp) {
- if (lastfrag != ufsi->i_lastfrag)
- goto repeat;
- else
- return NULL;
- }
+ if (!tmp)
+ return NULL;
lastfrag = ufsi->i_lastfrag;
-
}
tmp = ufs_data_ptr_to_cpu(sb,
ufs_get_direct_data_ptr(uspi, ufsi,
phys != NULL ? locked_page : NULL);
}
if (!tmp) {
- if ((!blockoff && ufs_data_ptr_to_cpu(sb, p)) ||
- (blockoff && lastfrag != ufsi->i_lastfrag))
- goto repeat;
*err = -ENOSPC;
return NULL;
}
if (IS_SYNC(inode))
ufs_sync_inode (inode);
mark_inode_dirty(inode);
- UFSD("EXIT, result %llu\n", (unsigned long long)tmp + blockoff);
return result;
/* This part : To be implemented ....
p = (__fs64 *)bh->b_data + block;
else
p = (__fs32 *)bh->b_data + block;
-repeat:
+
tmp = ufs_data_ptr_to_cpu(sb, p);
if (tmp) {
- if (!phys) {
+ if (!phys)
result = sb_getblk(sb, uspi->s_sbbase + tmp + blockoff);
- if (tmp == ufs_data_ptr_to_cpu(sb, p))
- goto out;
- brelse (result);
- goto repeat;
- } else {
+ else
*phys = uspi->s_sbbase + tmp + blockoff;
- goto out;
- }
+ goto out;
}
if (block && (uspi->fs_magic == UFS2_MAGIC ?
goal = bh->b_blocknr + uspi->s_fpb;
tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal,
uspi->s_fpb, err, locked_page);
- if (!tmp) {
- if (ufs_data_ptr_to_cpu(sb, p))
- goto repeat;
+ if (!tmp)
goto out;
- }
-
if (!phys) {
result = sb_getblk(sb, uspi->s_sbbase + tmp + blockoff);
sync_dirty_buffer(bh);
inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(inode);
- UFSD("result %llu\n", (unsigned long long)tmp + blockoff);
out:
brelse (bh);
UFSD("EXIT\n");