Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144933
b: refs/heads/master
c: c34e6e8
h: refs/heads/master
i:
  144931: 49bd2d3
v: v3
  • Loading branch information
Kevin D. Kissell authored and Ralf Baechle committed May 14, 2009
1 parent 7d43535 commit 16b00be
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 49 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: 5732c468495effd3089c1c893f3eba9a8a1d373c
refs/heads/master: c34e6e8bdd99c746b7844c937c3a2529ef2c4437
19 changes: 11 additions & 8 deletions trunk/arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1484,14 +1484,15 @@ static inline unsigned int \
set_c0_##name(unsigned int set) \
{ \
unsigned int res; \
unsigned int new; \
unsigned int omt; \
unsigned long flags; \
\
local_irq_save(flags); \
omt = __dmt(); \
res = read_c0_##name(); \
res |= set; \
write_c0_##name(res); \
new = res | set; \
write_c0_##name(new); \
__emt(omt); \
local_irq_restore(flags); \
\
Expand All @@ -1502,34 +1503,36 @@ static inline unsigned int \
clear_c0_##name(unsigned int clear) \
{ \
unsigned int res; \
unsigned int new; \
unsigned int omt; \
unsigned long flags; \
\
local_irq_save(flags); \
omt = __dmt(); \
res = read_c0_##name(); \
res &= ~clear; \
write_c0_##name(res); \
new = res & ~clear; \
write_c0_##name(new); \
__emt(omt); \
local_irq_restore(flags); \
\
return res; \
} \
\
static inline unsigned int \
change_c0_##name(unsigned int change, unsigned int new) \
change_c0_##name(unsigned int change, unsigned int newbits) \
{ \
unsigned int res; \
unsigned int new; \
unsigned int omt; \
unsigned long flags; \
\
local_irq_save(flags); \
\
omt = __dmt(); \
res = read_c0_##name(); \
res &= ~change; \
res |= (new & change); \
write_c0_##name(res); \
new = res & ~change; \
new |= (newbits & change); \
write_c0_##name(new); \
__emt(omt); \
local_irq_restore(flags); \
\
Expand Down
39 changes: 3 additions & 36 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,28 +1469,21 @@ read_block_for_search(struct btrfs_trans_handle *trans,
u32 blocksize;
struct extent_buffer *b = *eb_ret;
struct extent_buffer *tmp;
int ret;

blocknr = btrfs_node_blockptr(b, slot);
gen = btrfs_node_ptr_generation(b, slot);
blocksize = btrfs_level_size(root, level - 1);

tmp = btrfs_find_tree_block(root, blocknr, blocksize);
if (tmp && btrfs_buffer_uptodate(tmp, gen)) {
/*
* we found an up to date block without sleeping, return
* right away
*/
*eb_ret = tmp;
return 0;
}

/*
* reduce lock contention at high levels
* of the btree by dropping locks before
* we read. Don't release the lock on the current
* level because we need to walk this node to figure
* out which blocks to read.
* we read.
*/
btrfs_unlock_up_safe(p, level + 1);
btrfs_set_path_blocking(p);
Expand All @@ -1501,21 +1494,10 @@ read_block_for_search(struct btrfs_trans_handle *trans,
reada_for_search(root, p, level, slot, key->objectid);

btrfs_release_path(NULL, p);

ret = -EAGAIN;
tmp = read_tree_block(root, blocknr, blocksize, gen);
if (tmp) {
/*
* If the read above didn't mark this buffer up to date,
* it will never end up being up to date. Set ret to EIO now
* and give up so that our caller doesn't loop forever
* on our EAGAINs.
*/
if (!btrfs_buffer_uptodate(tmp, 0))
ret = -EIO;
if (tmp)
free_extent_buffer(tmp);
}
return ret;
return -EAGAIN;
}

/*
Expand Down Expand Up @@ -1714,9 +1696,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
if (ret == -EAGAIN)
goto again;

if (ret == -EIO)
goto done;

if (!p->skip_locking) {
int lret;

Expand Down Expand Up @@ -1759,8 +1738,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
*/
if (!p->leave_spinning)
btrfs_set_path_blocking(p);
if (ret < 0)
btrfs_release_path(root, p);
return ret;
}

Expand Down Expand Up @@ -4235,11 +4212,6 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
if (ret == -EAGAIN)
goto again;

if (ret < 0) {
btrfs_release_path(root, path);
goto done;
}

if (!path->skip_locking) {
ret = btrfs_try_spin_lock(next);
if (!ret) {
Expand Down Expand Up @@ -4274,11 +4246,6 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
if (ret == -EAGAIN)
goto again;

if (ret < 0) {
btrfs_release_path(root, path);
goto done;
}

if (!path->skip_locking) {
btrfs_assert_tree_locked(path->nodes[level]);
ret = btrfs_try_spin_lock(next);
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,

if (ret == 0)
set_bit(EXTENT_BUFFER_UPTODATE, &buf->bflags);
else
WARN_ON(1);
return buf;

}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ btrfs_lookup_first_block_group(struct btrfs_fs_info *info, u64 bytenr)
}

/*
* return the block group that contains the given bytenr
* return the block group that contains teh given bytenr
*/
struct btrfs_block_group_cache *btrfs_lookup_block_group(
struct btrfs_fs_info *info,
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3122,7 +3122,6 @@ static noinline void init_btrfs_i(struct inode *inode)
bi->flags = 0;
bi->index_cnt = (u64)-1;
bi->last_unlink_trans = 0;
bi->ordered_data_close = 0;
extent_map_tree_init(&BTRFS_I(inode)->extent_tree, GFP_NOFS);
extent_io_tree_init(&BTRFS_I(inode)->io_tree,
inode->i_mapping, GFP_NOFS);
Expand Down Expand Up @@ -4296,6 +4295,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
}
if (err) {
free_extent_map(em);
WARN_ON(1);
return ERR_PTR(err);
}
return em;
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ static int btrfs_defrag_file(struct file *file)
return 0;
}

/*
* Called inside transaction, so use GFP_NOFS
*/

static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg)
{
u64 new_size;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
if (btrfs_test_opt(root, SSD))
seq_puts(seq, ",ssd");
if (btrfs_test_opt(root, NOTREELOG))
seq_puts(seq, ",notreelog");
seq_puts(seq, ",no-treelog");
if (btrfs_test_opt(root, FLUSHONCOMMIT))
seq_puts(seq, ",flushoncommit");
seq_puts(seq, ",flush-on-commit");
if (!(root->fs_info->sb->s_flags & MS_POSIXACL))
seq_puts(seq, ",noacl");
return 0;
Expand Down

0 comments on commit 16b00be

Please sign in to comment.