[Ocfs2-commits] jlbec commits r2061 - trunk/fs/usysfs
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Mar 25 19:47:48 CST 2005
Author: jlbec
Signed-off-by: manish
Date: 2005-03-25 19:47:47 -0600 (Fri, 25 Mar 2005)
New Revision: 2061
Modified:
trunk/fs/usysfs/dir.c
trunk/fs/usysfs/inode.c
trunk/fs/usysfs/usysfs_internal.h
Log:
o Change USYSFS_DEFAULT_DIR to USYSFS_USET_DEFAULT
o Instead of using USYSFS_DIR and USYSFS_USET_DEFAULT as alternatives,
make default_set objects have (USYSFS_DIR | USYSFS_USET_DEFAULT).
Because they _are_ dirs.
Signed-off-by: manish
Modified: trunk/fs/usysfs/dir.c
===================================================================
--- trunk/fs/usysfs/dir.c 2005-03-26 01:37:39 UTC (rev 2060)
+++ trunk/fs/usysfs/dir.c 2005-03-26 01:47:47 UTC (rev 2061)
@@ -305,7 +305,7 @@
if (sd->s_type & USYSFS_NOT_PINNED)
continue;
/* Eww, recursion */
- if (sd->s_type & USYSFS_DEFAULT_DIR) {
+ if (sd->s_type & USYSFS_USET_DEFAULT) {
ret = usysfs_empty_dir(sd->s_dentry);
if (!ret)
continue;
@@ -386,7 +386,7 @@
parent_sd = dentry->d_fsdata;
list_for_each_entry_safe(sd, tmp, &parent_sd->s_children, s_sibling) {
if (!sd->s_element ||
- !(sd->s_type & USYSFS_DEFAULT_DIR))
+ !(sd->s_type & USYSFS_USET_DEFAULT))
continue;
child = sd->s_dentry;
@@ -439,7 +439,7 @@
&uset->uobj, child);
if (!ret) {
sd = child->d_fsdata;
- sd->s_type = USYSFS_DEFAULT_DIR;
+ sd->s_type |= USYSFS_USET_DEFAULT;
} else {
d_delete(child);
dput(child);
@@ -697,7 +697,7 @@
return -EPERM;
sd = dentry->d_fsdata;
- if (sd->s_type & USYSFS_DEFAULT_DIR)
+ if (sd->s_type & USYSFS_USET_DEFAULT)
return -EPERM;
parent_uobj = usysfs_get_uobject(dentry->d_parent);
Modified: trunk/fs/usysfs/inode.c
===================================================================
--- trunk/fs/usysfs/inode.c 2005-03-26 01:37:39 UTC (rev 2060)
+++ trunk/fs/usysfs/inode.c 2005-03-26 01:47:47 UTC (rev 2061)
@@ -121,16 +121,13 @@
if (!sd || !sd->s_element)
BUG();
- switch (sd->s_type) {
- case USYSFS_DIR:
- case USYSFS_DEFAULT_DIR:
- case USYSFS_UOBJ_LINK:
- /* Always have a dentry so use that */
- return sd->s_dentry->d_name.name;
+ /* These always have a dentry, so use that */
+ if (sd->s_type & (USYSFS_DIR | USYSFS_UOBJ_LINK))
+ return sd->s_dentry->d_name.name;
- case USYSFS_UOBJ_ATTR:
- attr = sd->s_element;
- return attr->name;
+ if (sd->s_type & USYSFS_UOBJ_ATTR) {
+ attr = sd->s_element;
+ return attr->name;
}
return NULL;
}
Modified: trunk/fs/usysfs/usysfs_internal.h
===================================================================
--- trunk/fs/usysfs/usysfs_internal.h 2005-03-26 01:37:39 UTC (rev 2060)
+++ trunk/fs/usysfs/usysfs_internal.h 2005-03-26 01:47:47 UTC (rev 2061)
@@ -46,7 +46,8 @@
#define USYSFS_DIR 0x0002
#define USYSFS_UOBJ_ATTR 0x0004
#define USYSFS_UOBJ_LINK 0x0020
-#define USYSFS_DEFAULT_DIR 0x0040
+#define USYSFS_USET_DIR 0x0040
+#define USYSFS_USET_DEFAULT 0x0080
#define USYSFS_NOT_PINNED (USYSFS_UOBJ_ATTR)
extern struct vfsmount * usysfs_mount;
More information about the Ocfs2-commits
mailing list