Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29682
b: refs/heads/master
c: f391475
h: refs/heads/master
v: v3
  • Loading branch information
Evgeniy Dushistov authored and Linus Torvalds committed Jun 25, 2006
1 parent 8c7582e commit 9a2bc79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 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: 96710b29e05f3b470bc4206366021b56e28d5208
refs/heads/master: f391475812ba39afa322c835217ffe936f5e754a
12 changes: 5 additions & 7 deletions trunk/fs/ufs/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,17 @@ static struct page *ufs_get_locked_page(struct address_space *mapping,
* We can come here from ufs_writepage or ufs_prepare_write,
* locked_page is argument of these functions, so we already lock it.
*/
static void ufs_change_blocknr(struct inode *inode, unsigned int count,
unsigned int oldb, unsigned int newb,
struct page *locked_page)
static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk,
unsigned int count, unsigned int oldb,
unsigned int newb, struct page *locked_page)
{
unsigned int blk_per_page = 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits);
sector_t baseblk;
struct address_space *mapping = inode->i_mapping;
pgoff_t index, cur_index = locked_page->index;
unsigned int i, j;
struct page *page;
struct buffer_head *head, *bh;

baseblk = ((i_size_read(inode) - 1) >> inode->i_blkbits) + 1 - count;

UFSD("ENTER, ino %lu, count %u, oldb %u, newb %u\n",
inode->i_ino, count, oldb, newb);

Expand Down Expand Up @@ -439,7 +436,8 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment,
}
result = ufs_alloc_fragments (inode, cgno, goal, request, err);
if (result) {
ufs_change_blocknr(inode, oldcount, tmp, result, locked_page);
ufs_change_blocknr(inode, fragment - oldcount, oldcount, tmp,
result, locked_page);

*p = cpu_to_fs32(sb, result);
*err = 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ ufs_clear_frags(struct inode *inode, sector_t beg,
for (++beg; beg < end; ++beg) {
bh = sb_getblk(inode->i_sb, beg);
ufs_clear_frag(inode, bh);
brelse(bh);
}
return res;
}
Expand Down

0 comments on commit 9a2bc79

Please sign in to comment.