Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75520
b: refs/heads/master
c: 5a26db5
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Peter Zijlstra committed Jan 16, 2008
1 parent b8e1b9d commit f9602ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 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: 456ef1553cb2b06729d64c1d1f0f2bda34e9b201
refs/heads/master: 5a26db5bd25cf4bf32ae9fa9f6136b6b6d5b45c5
8 changes: 2 additions & 6 deletions trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,8 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
sd = sysfs_find_dirent(parent_sd, dentry->d_name.name);

/* no such entry */
if (!sd) {
ret = ERR_PTR(-ENOENT);
if (!sd)
goto out_unlock;
}

/* attach dentry and inode */
inode = sysfs_get_inode(sd);
Expand Down Expand Up @@ -783,7 +781,6 @@ int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
old_dentry = sysfs_get_dentry(sd);
if (IS_ERR(old_dentry)) {
error = PTR_ERR(old_dentry);
old_dentry = NULL;
goto out;
}

Expand Down Expand Up @@ -851,15 +848,13 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj)
old_dentry = sysfs_get_dentry(sd);
if (IS_ERR(old_dentry)) {
error = PTR_ERR(old_dentry);
old_dentry = NULL;
goto out;
}
old_parent = old_dentry->d_parent;

new_parent = sysfs_get_dentry(new_parent_sd);
if (IS_ERR(new_parent)) {
error = PTR_ERR(new_parent);
new_parent = NULL;
goto out;
}

Expand All @@ -883,6 +878,7 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj)
error = 0;
d_add(new_dentry, NULL);
d_move(old_dentry, new_dentry);
dput(new_dentry);

/* Remove from old parent's list and insert into new parent's list. */
sysfs_unlink_sibling(sd);
Expand Down
12 changes: 8 additions & 4 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2943,9 +2943,10 @@ void lockdep_free_key_range(void *start, unsigned long size)
struct list_head *head;
unsigned long flags;
int i;
int locked;

raw_local_irq_save(flags);
graph_lock();
locked = graph_lock();

/*
* Unhash all classes that were created by this module:
Expand All @@ -2959,7 +2960,8 @@ void lockdep_free_key_range(void *start, unsigned long size)
zap_class(class);
}

graph_unlock();
if (locked)
graph_unlock();
raw_local_irq_restore(flags);
}

Expand All @@ -2969,6 +2971,7 @@ void lockdep_reset_lock(struct lockdep_map *lock)
struct list_head *head;
unsigned long flags;
int i, j;
int locked;

raw_local_irq_save(flags);

Expand All @@ -2987,7 +2990,7 @@ void lockdep_reset_lock(struct lockdep_map *lock)
* Debug check: in the end all mapped classes should
* be gone.
*/
graph_lock();
locked = graph_lock();
for (i = 0; i < CLASSHASH_SIZE; i++) {
head = classhash_table + i;
if (list_empty(head))
Expand All @@ -3000,7 +3003,8 @@ void lockdep_reset_lock(struct lockdep_map *lock)
}
}
}
graph_unlock();
if (locked)
graph_unlock();

out_restore:
raw_local_irq_restore(flags);
Expand Down

0 comments on commit f9602ec

Please sign in to comment.