Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363239
b: refs/heads/master
c: 3db3c62
h: refs/heads/master
i:
  363237: 45b12b5
  363235: a97f3bb
  363231: 818bae2
v: v3
  • Loading branch information
Maarten Lankhorst authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent 86741a6 commit 0e2a2de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 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: 91721197def2fc69abf152c47dbb87eed0f13333
refs/heads/master: 3db3c62584fbafee52a068035cc4c57e7b921acf
17 changes: 2 additions & 15 deletions trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,8 @@ struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
if (unlikely(!sd))
return NULL;

while (1) {
int v, t;

v = atomic_read(&sd->s_active);
if (unlikely(v < 0))
return NULL;

t = atomic_cmpxchg(&sd->s_active, v, v + 1);
if (likely(t == v))
break;
if (t < 0)
return NULL;

cpu_relax();
}
if (!atomic_inc_unless_negative(&sd->s_active))
return NULL;

if (likely(!ignore_lockdep(sd)))
rwsem_acquire_read(&sd->dep_map, 0, 1, _RET_IP_);
Expand Down

0 comments on commit 0e2a2de

Please sign in to comment.