Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173184
b: refs/heads/master
c: 27b3a5c
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Oct 14, 2009
1 parent 5466003 commit 0bd0a1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 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: 205cb37b89ab37db553907e5ac17962eec561804
refs/heads/master: 27b3a5c51b50a234fb4a21146841e6723b5934ce
11 changes: 2 additions & 9 deletions trunk/fs/reiserfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
struct cpu_key key;
struct buffer_head *bh;
struct item_head *ih, tmp_ih;
int fs_gen;
b_blocknr_t blocknr;
char *p = NULL;
int chars;
Expand All @@ -265,7 +264,6 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
(loff_t) block * inode->i_sb->s_blocksize + 1, TYPE_ANY,
3);

research:
result = search_for_position_by_key(inode->i_sb, &key, &path);
if (result != POSITION_FOUND) {
pathrelse(&path);
Expand Down Expand Up @@ -340,21 +338,16 @@ static int _get_block_create_0(struct inode *inode, sector_t block,
}
// read file tail into part of page
offset = (cpu_key_k_offset(&key) - 1) & (PAGE_CACHE_SIZE - 1);
fs_gen = get_generation(inode->i_sb);
copy_item_head(&tmp_ih, ih);

/* we only want to kmap if we are reading the tail into the page.
** this is not the common case, so we don't kmap until we are
** sure we need to. But, this means the item might move if
** kmap schedules
*/
if (!p) {
if (!p)
p = (char *)kmap(bh_result->b_page);
if (fs_changed(fs_gen, inode->i_sb)
&& item_moved(&tmp_ih, &path)) {
goto research;
}
}

p += offset;
memset(p, 0, inode->i_sb->s_blocksize);
do {
Expand Down

0 comments on commit 0bd0a1d

Please sign in to comment.