Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187084
b: refs/heads/master
c: a2db684
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent d02f516 commit 9ed3ea2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 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: e72ceb8ccac5f770b3e696e09bb673dca7024b20
refs/heads/master: a2db6842873c8e5a70652f278d469128cb52db70
5 changes: 4 additions & 1 deletion trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ static void sysfs_deactivate(struct sysfs_dirent *sd)
int v;

BUG_ON(sd->s_sibling || !(sd->s_flags & SYSFS_FLAG_REMOVED));

if (!(sysfs_type(sd) & SYSFS_ACTIVE_REF))
return;

sd->s_sibling = (void *)&wait;

rwsem_acquire(&sd->dep_map, 0, 0, _RET_IP_);
Expand Down Expand Up @@ -315,7 +319,6 @@ struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, int type)

atomic_set(&sd->s_count, 1);
atomic_set(&sd->s_active, 0);
sysfs_dirent_init_lockdep(sd);

sd->s_name = name;
sd->s_mode = mode;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/sysfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ int sysfs_add_file_mode(struct sysfs_dirent *dir_sd,
if (!sd)
return -ENOMEM;
sd->s_attr.attr = (void *)attr;
sysfs_dirent_init_lockdep(sd);

sysfs_addrm_start(&acxt, dir_sd);
rc = sysfs_add_one(&acxt, sd);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/sysfs/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct sysfs_dirent {
#define SYSFS_KOBJ_BIN_ATTR 0x0004
#define SYSFS_KOBJ_LINK 0x0008
#define SYSFS_COPY_NAME (SYSFS_DIR | SYSFS_KOBJ_LINK)
#define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR)

#define SYSFS_FLAG_MASK ~SYSFS_TYPE_MASK
#define SYSFS_FLAG_REMOVED 0x0200
Expand Down

0 comments on commit 9ed3ea2

Please sign in to comment.