Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132123
b: refs/heads/master
c: cbd88c8
h: refs/heads/master
i:
  132121: c2325f4
  132119: fa3cd19
v: v3
  • Loading branch information
Rusty Russell committed Mar 8, 2009
1 parent d8f310c commit 9fc9a11
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 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: 1c91ffc896cf839a3a0923c0062ff61c930a21e0
refs/heads/master: cbd88c8e6f5cdb8d4b9af01df825305200240382
5 changes: 5 additions & 0 deletions trunk/arch/x86/lguest/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
* flush_tlb_user() for both user and kernel mappings unless
* the Page Global Enable (PGE) feature bit is set. */
*dx |= 0x00002000;
/* We also lie, and say we're family id 5. 6 or greater
* leads to a rdmsr in early_init_intel which we can't handle.
* Family ID is returned as bits 8-12 in ax. */
*ax &= 0xFFFFF0FF;
*ax |= 0x00000500;
break;
case 0x80000000:
/* Futureproof this a little: if they ask how much extended
Expand Down
10 changes: 5 additions & 5 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
if (*cow_ret == buf)
unlock_orig = 1;

btrfs_assert_tree_locked(buf);
WARN_ON(!btrfs_tree_locked(buf));

if (parent)
parent_start = parent->start;
Expand Down Expand Up @@ -2365,7 +2365,7 @@ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_root
if (slot >= btrfs_header_nritems(upper) - 1)
return 1;

btrfs_assert_tree_locked(path->nodes[1]);
WARN_ON(!btrfs_tree_locked(path->nodes[1]));

right = read_node_slot(root, upper, slot + 1);
btrfs_tree_lock(right);
Expand Down Expand Up @@ -2562,7 +2562,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
if (right_nritems == 0)
return 1;

btrfs_assert_tree_locked(path->nodes[1]);
WARN_ON(!btrfs_tree_locked(path->nodes[1]));

left = read_node_slot(root, path->nodes[1], slot - 1);
btrfs_tree_lock(left);
Expand Down Expand Up @@ -4101,7 +4101,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)

next = read_node_slot(root, c, slot);
if (!path->skip_locking) {
btrfs_assert_tree_locked(c);
WARN_ON(!btrfs_tree_locked(c));
btrfs_tree_lock(next);
btrfs_set_lock_blocking(next);
}
Expand All @@ -4126,7 +4126,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
reada_for_search(root, path, level, slot, 0);
next = read_node_slot(root, next, 0);
if (!path->skip_locking) {
btrfs_assert_tree_locked(path->nodes[level]);
WARN_ON(!btrfs_tree_locked(path->nodes[level]));
btrfs_tree_lock(next);
btrfs_set_lock_blocking(next);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
struct inode *btree_inode = root->fs_info->btree_inode;
if (btrfs_header_generation(buf) ==
root->fs_info->running_transaction->transid) {
btrfs_assert_tree_locked(buf);
WARN_ON(!btrfs_tree_locked(buf));

/* ugh, clear_extent_buffer_dirty can be expensive */
btrfs_set_lock_blocking(buf);
Expand Down Expand Up @@ -2361,7 +2361,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)

btrfs_set_lock_blocking(buf);

btrfs_assert_tree_locked(buf);
WARN_ON(!btrfs_tree_locked(buf));
if (transid != root->fs_info->generation) {
printk(KERN_CRIT "btrfs transid mismatch buffer %llu, "
"found %llu running %llu\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4418,13 +4418,13 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
path = btrfs_alloc_path();
BUG_ON(!path);

btrfs_assert_tree_locked(parent);
BUG_ON(!btrfs_tree_locked(parent));
parent_level = btrfs_header_level(parent);
extent_buffer_get(parent);
path->nodes[parent_level] = parent;
path->slots[parent_level] = btrfs_header_nritems(parent);

btrfs_assert_tree_locked(node);
BUG_ON(!btrfs_tree_locked(node));
level = btrfs_header_level(node);
extent_buffer_get(node);
path->nodes[level] = node;
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/locking.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ int btrfs_tree_unlock(struct extent_buffer *eb)
return 0;
}

void btrfs_assert_tree_locked(struct extent_buffer *eb)
int btrfs_tree_locked(struct extent_buffer *eb)
{
if (!test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags))
assert_spin_locked(&eb->lock);
return test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags) ||
spin_is_locked(&eb->lock);
}
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

int btrfs_tree_lock(struct extent_buffer *eb);
int btrfs_tree_unlock(struct extent_buffer *eb);
int btrfs_tree_locked(struct extent_buffer *eb);

int btrfs_try_tree_lock(struct extent_buffer *eb);
int btrfs_try_spin_lock(struct extent_buffer *eb);

void btrfs_set_lock_blocking(struct extent_buffer *eb);
void btrfs_clear_lock_blocking(struct extent_buffer *eb);
void btrfs_assert_tree_locked(struct extent_buffer *eb);
#endif
6 changes: 1 addition & 5 deletions trunk/kernel/tsacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,19 @@ void acct_update_integrals(struct task_struct *tsk)
if (likely(tsk->mm)) {
cputime_t time, dtime;
struct timeval value;
unsigned long flags;
u64 delta;

local_irq_save(flags);
time = tsk->stime + tsk->utime;
dtime = cputime_sub(time, tsk->acct_timexpd);
jiffies_to_timeval(cputime_to_jiffies(dtime), &value);
delta = value.tv_sec;
delta = delta * USEC_PER_SEC + value.tv_usec;

if (delta == 0)
goto out;
return;
tsk->acct_timexpd = time;
tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm);
tsk->acct_vm_mem1 += delta * tsk->mm->total_vm;
out:
local_irq_restore(flags);
}
}

Expand Down

0 comments on commit 9fc9a11

Please sign in to comment.