summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo2007-06-13 21:27:22 +0200
committerGreg Kroah-Hartman2007-07-12 01:09:08 +0200
commit380e6fbb729a55b73d5d8409551474884e0d93fc (patch)
tree38922357a91869f0d8c9769fa5afa504f1175fc0 /fs/sysfs/inode.c
parentsysfs: rename sysfs_dirent->s_type to s_flags and make room for flags (diff)
downloadkernel-qcow2-linux-380e6fbb729a55b73d5d8409551474884e0d93fc.tar.gz
kernel-qcow2-linux-380e6fbb729a55b73d5d8409551474884e0d93fc.tar.xz
kernel-qcow2-linux-380e6fbb729a55b73d5d8409551474884e0d93fc.zip
sysfs: implement SYSFS_FLAG_REMOVED flag
Implement SYSFS_FLAG_REMOVED flag which currently is used only to improve sanity check in sysfs_deactivate(). The flag will be used to make directory entries reclamiable. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index ee3a5d957051..e2f6ef138d20 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -296,6 +296,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
if (!sysfs_type(sd))
continue;
if (!strcmp(sd->s_name, name)) {
+ sd->s_flags |= SYSFS_FLAG_REMOVED;
*pos = sd->s_sibling;
sd->s_sibling = NULL;
found = 1;