[Ocfs2-commits] jlbec commits r2072 - trunk/fs/configfs
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Mar 29 16:31:35 CST 2005
Author: jlbec
Signed-off-by: manish
Date: 2005-03-29 16:31:33 -0600 (Tue, 29 Mar 2005)
New Revision: 2072
Modified:
trunk/fs/configfs/dir.c
Log:
o Rename configfs_instantiate_{object,set} to
configfs_attach_{object,set} and configfs_drop_{object,set} to
configfs_detach_{object,set}. This is to remove confusion with
set_ops->drop_set.
Signed-off-by: manish
Modified: trunk/fs/configfs/dir.c
===================================================================
--- trunk/fs/configfs/dir.c 2005-03-29 22:09:26 UTC (rev 2071)
+++ trunk/fs/configfs/dir.c 2005-03-29 22:31:33 UTC (rev 2072)
@@ -40,7 +40,8 @@
DECLARE_RWSEM(configfs_rename_sem);
static spinlock_t configfs_linkage_lock = SPIN_LOCK_UNLOCKED;
-static void configfs_d_iput(struct dentry * dentry, struct inode * inode)
+static void configfs_d_iput(struct dentry * dentry,
+ struct inode * inode)
{
struct configfs_dirent * sd = dentry->d_fsdata;
@@ -70,7 +71,7 @@
/*
* Allocates a new configfs_dirent and links it to the parent configfs_dirent
*/
-static struct configfs_dirent * configfs_new_dirent(struct configfs_dirent * parent_sd,
+static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * parent_sd,
void * element)
{
struct configfs_dirent * sd;
@@ -89,8 +90,9 @@
return sd;
}
-int configfs_make_dirent(struct configfs_dirent * parent_sd, struct dentry * dentry,
- void * element, umode_t mode, int type)
+int configfs_make_dirent(struct configfs_dirent * parent_sd,
+ struct dentry * dentry, void * element,
+ umode_t mode, int type)
{
struct configfs_dirent * sd;
@@ -177,8 +179,9 @@
return error;
}
-int configfs_create_link(struct configfs_symlink *sl, struct dentry *parent,
- struct dentry *dentry)
+int configfs_create_link(struct configfs_symlink *sl,
+ struct dentry *parent,
+ struct dentry *dentry)
{
int err = 0;
umode_t mode = S_IFLNK | S_IRWXUGO;
@@ -254,8 +257,9 @@
return 0;
}
-static struct dentry * configfs_lookup(struct inode *dir, struct dentry *dentry,
- struct nameidata *nd)
+static struct dentry * configfs_lookup(struct inode *dir,
+ struct dentry *dentry,
+ struct nameidata *nd)
{
struct configfs_dirent * parent_sd = dentry->d_parent->d_fsdata;
struct configfs_dirent * sd;
@@ -319,7 +323,7 @@
return ret;
}
-static void drop_attrs(struct uobject * uobj)
+static void detach_attrs(struct uobject * uobj)
{
struct dentry * dentry = dget(uobj->dentry);
struct configfs_dirent * parent_sd;
@@ -363,17 +367,17 @@
}
if (error)
- drop_attrs(uobj);
+ detach_attrs(uobj);
return error;
}
-static int configfs_instantiate_set(struct uobject *parent_uobj,
- struct uobject *uobj,
- struct dentry *dentry);
-static void configfs_drop_set(struct uobject *uobj);
+static int configfs_attach_set(struct uobject *parent_uobj,
+ struct uobject *uobj,
+ struct dentry *dentry);
+static void configfs_detach_set(struct uobject *uobj);
-static void drop_sets(struct uset *uset)
+static void detach_sets(struct uset *uset)
{
struct dentry * dentry = dget(uset->uobj.dentry);
struct dentry *child;
@@ -393,7 +397,7 @@
/* And now we're faking rmdir. Viro must hate me */
down(&child->d_inode->i_sem);
- configfs_drop_set(sd->s_element);
+ configfs_detach_set(sd->s_element);
child->d_inode->i_flags |= S_DEAD;
up(&child->d_inode->i_sem);
@@ -409,7 +413,7 @@
/*
* This fakes mkdir(2) on a default_sets[] entry. It
- * creates a dentry, instantiates it, and then does fixup
+ * creates a dentry, attachs it, and then does fixup
* on the sd->s_type.
*
* We could, perhaps, tweak our parent's ->mkdir for a minute and
@@ -435,8 +439,8 @@
if (child) {
d_add(child, NULL);
- ret = configfs_instantiate_set(&parent_uset->uobj,
- &uset->uobj, child);
+ ret = configfs_attach_set(&parent_uset->uobj,
+ &uset->uobj, child);
if (!ret) {
sd = child->d_fsdata;
sd->s_type |= CONFIGFS_USET_DEFAULT;
@@ -478,7 +482,7 @@
}
if (ret)
- drop_sets(uset);
+ detach_sets(uset);
return ret;
}
@@ -520,8 +524,8 @@
}
/*
- * The goal is that configfs_instantiate_object() (and
- * configfs_instantiate_set()) can be called from either the VFS or this
+ * The goal is that configfs_attach_object() (and
+ * configfs_attach_set()) can be called from either the VFS or this
* module. That is, they assume that the objects have been created,
* the dentry allocated, and the dcache is all ready to go.
*
@@ -529,14 +533,14 @@
* had never been called. The caller (VFS or local function) will
* handle cleaning up the dcache bits.
*
- * configfs_drop_set() and configfs_drop_object() behave similarly on the
+ * configfs_detach_set() and configfs_detach_object() behave similarly on the
* way out. They assume that the proper semaphores are held, they
* clean up the configfs objects, and they expect their callers will
* handle the dcache bits.
*/
-static int configfs_instantiate_object(struct uobject *parent_uobj,
- struct uobject *uobj,
- struct dentry *dentry)
+static int configfs_attach_object(struct uobject *parent_uobj,
+ struct uobject *uobj,
+ struct dentry *dentry)
{
int ret;
@@ -554,28 +558,28 @@
return ret;
}
-static void configfs_drop_object(struct uobject *uobj)
+static void configfs_detach_object(struct uobject *uobj)
{
- drop_attrs(uobj);
+ detach_attrs(uobj);
configfs_remove_dir(uobj);
unlink_obj(uobj);
}
-static int configfs_instantiate_set(struct uobject *parent_uobj,
- struct uobject *uobj,
- struct dentry *dentry)
+static int configfs_attach_set(struct uobject *parent_uobj,
+ struct uobject *uobj,
+ struct dentry *dentry)
{
int ret;
struct configfs_dirent *sd;
- ret = configfs_instantiate_object(parent_uobj, uobj, dentry);
+ ret = configfs_attach_object(parent_uobj, uobj, dentry);
if (!ret) {
sd = dentry->d_fsdata;
sd->s_type |= CONFIGFS_USET_DIR;
ret = populate_sets(to_uset(uobj));
if (ret) {
- configfs_drop_object(uobj);
+ configfs_detach_object(uobj);
d_delete(dentry);
}
}
@@ -583,10 +587,10 @@
return ret;
}
-static void configfs_drop_set(struct uobject *uobj)
+static void configfs_detach_set(struct uobject *uobj)
{
- drop_sets(to_uset(uobj));
- configfs_drop_object(uobj);
+ detach_sets(to_uset(uobj));
+ configfs_detach_object(uobj);
}
/*
@@ -664,13 +668,13 @@
owner = uktype->owner;
if (try_module_get(owner)) {
if (uset)
- ret = configfs_instantiate_set(parent_uobj,
- uobj,
- dentry);
+ ret = configfs_attach_set(parent_uobj,
+ uobj,
+ dentry);
else
- ret = configfs_instantiate_object(parent_uobj,
- uobj,
- dentry);
+ ret = configfs_attach_object(parent_uobj,
+ uobj,
+ dentry);
if (ret) {
client_drop_object(parent_uobj, uobj);
uobject_put(parent_uobj);
@@ -719,9 +723,9 @@
owner = uobj->ktype->owner;
if (sd->s_type & CONFIGFS_USET_DIR)
- configfs_drop_set(uobj);
+ configfs_detach_set(uobj);
else
- configfs_drop_object(uobj);
+ configfs_detach_object(uobj);
client_drop_object(parent_uobj, uobj);
@@ -957,8 +961,7 @@
d_add(dentry, NULL);
sd = configfs_sb->s_root->d_fsdata;
- err = configfs_instantiate_set(sd->s_element, &set->uobj,
- dentry);
+ err = configfs_attach_set(sd->s_element, &set->uobj, dentry);
if (!err)
dentry = NULL;
else
@@ -990,7 +993,7 @@
if (configfs_empty_dir(dentry)) {
printk(KERN_ERR "configfs: Tried to unregister non-empty subsystem!\n");
}
- configfs_drop_set(&set->uobj);
+ configfs_detach_set(&set->uobj);
dentry->d_inode->i_flags |= S_DEAD;
up(&dentry->d_inode->i_sem);
More information about the Ocfs2-commits
mailing list