Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29678
b: refs/heads/master
c: 50aa4eb
h: refs/heads/master
v: v3
  • Loading branch information
Evgeniy Dushistov authored and Linus Torvalds committed Jun 25, 2006
1 parent 93fad0d commit d06be2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd187a2603d9904ddc410441348f0cfc558a5233
refs/heads/master: 50aa4eb0b978f4a0283471c776ed812269ac8af5
3 changes: 0 additions & 3 deletions trunk/fs/ufs/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment,
if (result) {
*p = cpu_to_fs32(sb, result);
*err = 0;
inode->i_blocks += count << uspi->s_nspfshift;
UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count);
}
unlock_super(sb);
Expand All @@ -409,7 +408,6 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment,
result = ufs_add_fragments (inode, tmp, oldcount, newcount, err);
if (result) {
*err = 0;
inode->i_blocks += count << uspi->s_nspfshift;
UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count);
unlock_super(sb);
UFSD("EXIT, result %u\n", result);
Expand Down Expand Up @@ -444,7 +442,6 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment,

*p = cpu_to_fs32(sb, result);
*err = 0;
inode->i_blocks += count << uspi->s_nspfshift;
UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count);
unlock_super(sb);
if (newcount < request)
Expand Down
25 changes: 12 additions & 13 deletions trunk/fs/ufs/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ static int ufs_trunc_direct (struct inode * inode)
frag1 = ufs_fragnum (frag1);
frag2 = ufs_fragnum (frag2);

inode->i_blocks -= (frag2-frag1) << uspi->s_nspfshift;
mark_inode_dirty(inode);
ufs_free_fragments (inode, tmp + frag1, frag2 - frag1);
mark_inode_dirty(inode);
frag_to_free = tmp + frag1;

next1:
Expand All @@ -128,8 +127,7 @@ static int ufs_trunc_direct (struct inode * inode)
continue;

*p = 0;
inode->i_blocks -= uspi->s_nspb;
mark_inode_dirty(inode);

if (free_count == 0) {
frag_to_free = tmp;
free_count = uspi->s_fpb;
Expand All @@ -140,6 +138,7 @@ static int ufs_trunc_direct (struct inode * inode)
frag_to_free = tmp;
free_count = uspi->s_fpb;
}
mark_inode_dirty(inode);
}

if (free_count > 0)
Expand All @@ -158,9 +157,9 @@ static int ufs_trunc_direct (struct inode * inode)
frag4 = ufs_fragnum (frag4);

*p = 0;
inode->i_blocks -= frag4 << uspi->s_nspfshift;
mark_inode_dirty(inode);

ufs_free_fragments (inode, tmp, frag4);
mark_inode_dirty(inode);
next3:

UFSD("EXIT\n");
Expand Down Expand Up @@ -219,7 +218,7 @@ static int ufs_trunc_indirect (struct inode * inode, unsigned offset, __fs32 *p)
frag_to_free = tmp;
free_count = uspi->s_fpb;
}
inode->i_blocks -= uspi->s_nspb;

mark_inode_dirty(inode);
}

Expand All @@ -232,9 +231,9 @@ static int ufs_trunc_indirect (struct inode * inode, unsigned offset, __fs32 *p)
if (i >= uspi->s_apb) {
tmp = fs32_to_cpu(sb, *p);
*p = 0;
inode->i_blocks -= uspi->s_nspb;
mark_inode_dirty(inode);

ufs_free_blocks (inode, tmp, uspi->s_fpb);
mark_inode_dirty(inode);
ubh_bforget(ind_ubh);
ind_ubh = NULL;
}
Expand Down Expand Up @@ -295,9 +294,9 @@ static int ufs_trunc_dindirect (struct inode *inode, unsigned offset, __fs32 *p)
if (i >= uspi->s_apb) {
tmp = fs32_to_cpu(sb, *p);
*p = 0;
inode->i_blocks -= uspi->s_nspb;

ufs_free_blocks(inode, tmp, uspi->s_fpb);
mark_inode_dirty(inode);
ufs_free_blocks (inode, tmp, uspi->s_fpb);
ubh_bforget(dind_bh);
dind_bh = NULL;
}
Expand Down Expand Up @@ -355,9 +354,9 @@ static int ufs_trunc_tindirect (struct inode * inode)
if (i >= uspi->s_apb) {
tmp = fs32_to_cpu(sb, *p);
*p = 0;
inode->i_blocks -= uspi->s_nspb;

ufs_free_blocks(inode, tmp, uspi->s_fpb);
mark_inode_dirty(inode);
ufs_free_blocks (inode, tmp, uspi->s_fpb);
ubh_bforget(tind_bh);
tind_bh = NULL;
}
Expand Down

0 comments on commit d06be2b

Please sign in to comment.