summaryrefslogtreecommitdiff
path: root/fs/kernfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-12-11 23:11:57 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-12 05:39:20 +0400
commita797bfc30532388e8a11ca726df60cdd77aa8675 (patch)
tree4e769d1d1dd394423e849091c39cefd6855ff53f /fs/kernfs/inode.c
parentdf23fc39bce03bb26e63bea57fc5f5bf6882d74b (diff)
downloadlinux-a797bfc30532388e8a11ca726df60cdd77aa8675.tar.xz
kernfs: s/sysfs/kernfs/ in global variables
kernfs has just been separated out from sysfs and we're already in full conflict mode. Nothing can make the situation any worse. Let's take the chance to name things properly. This patch performs the following renames. * s/sysfs_mutex/kernfs_mutex/ * s/sysfs_dentry_ops/kernfs_dops/ * s/sysfs_dir_operations/kernfs_dir_fops/ * s/sysfs_dir_inode_operations/kernfs_dir_iops/ * s/kernfs_file_operations/kernfs_file_fops/ - renamed for consistency * s/sysfs_symlink_inode_operations/kernfs_symlink_iops/ * s/sysfs_aops/kernfs_aops/ * s/sysfs_backing_dev_info/kernfs_bdi/ * s/sysfs_inode_operations/kernfs_iops/ * s/sysfs_dir_cachep/kernfs_node_cache/ * s/sysfs_ops/kernfs_sops/ This patch is strictly rename only and doesn't introduce any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs/inode.c')
-rw-r--r--fs/kernfs/inode.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c
index af92638d792b..c5f231e8d36d 100644
--- a/fs/kernfs/inode.c
+++ b/fs/kernfs/inode.c
@@ -18,19 +18,19 @@
#include "kernfs-internal.h"
-static const struct address_space_operations sysfs_aops = {
+static const struct address_space_operations kernfs_aops = {
.readpage = simple_readpage,
.write_begin = simple_write_begin,
.write_end = simple_write_end,
};
-static struct backing_dev_info sysfs_backing_dev_info = {
- .name = "sysfs",
+static struct backing_dev_info kernfs_bdi = {
+ .name = "kernfs",
.ra_pages = 0, /* No readahead */
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
};
-static const struct inode_operations sysfs_inode_operations = {
+static const struct inode_operations kernfs_iops = {
.permission = sysfs_permission,
.setattr = sysfs_setattr,
.getattr = sysfs_getattr,
@@ -42,8 +42,8 @@ static const struct inode_operations sysfs_inode_operations = {
void __init sysfs_inode_init(void)
{
- if (bdi_init(&sysfs_backing_dev_info))
- panic("failed to init sysfs_backing_dev_info");
+ if (bdi_init(&kernfs_bdi))
+ panic("failed to init kernfs_bdi");
}
static struct kernfs_iattrs *kernfs_iattrs(struct kernfs_node *kn)
@@ -109,9 +109,9 @@ int kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr)
{
int ret;
- mutex_lock(&sysfs_mutex);
+ mutex_lock(&kernfs_mutex);
ret = __kernfs_setattr(kn, iattr);
- mutex_unlock(&sysfs_mutex);
+ mutex_unlock(&kernfs_mutex);
return ret;
}
@@ -124,7 +124,7 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr)
if (!kn)
return -EINVAL;
- mutex_lock(&sysfs_mutex);
+ mutex_lock(&kernfs_mutex);
error = inode_change_ok(inode, iattr);
if (error)
goto out;
@@ -137,7 +137,7 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr)
setattr_copy(inode, iattr);
out:
- mutex_unlock(&sysfs_mutex);
+ mutex_unlock(&kernfs_mutex);
return error;
}
@@ -187,9 +187,9 @@ int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value,
if (error)
return error;
- mutex_lock(&sysfs_mutex);
+ mutex_lock(&kernfs_mutex);
error = sysfs_sd_setsecdata(kn, &secdata, &secdata_len);
- mutex_unlock(&sysfs_mutex);
+ mutex_unlock(&kernfs_mutex);
if (secdata)
security_release_secctx(secdata, secdata_len);
@@ -279,9 +279,9 @@ int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kernfs_node *kn = dentry->d_fsdata;
struct inode *inode = dentry->d_inode;
- mutex_lock(&sysfs_mutex);
+ mutex_lock(&kernfs_mutex);
sysfs_refresh_inode(kn, inode);
- mutex_unlock(&sysfs_mutex);
+ mutex_unlock(&kernfs_mutex);
generic_fillattr(inode, stat);
return 0;
@@ -291,9 +291,9 @@ static void sysfs_init_inode(struct kernfs_node *kn, struct inode *inode)
{
kernfs_get(kn);
inode->i_private = kn;
- inode->i_mapping->a_ops = &sysfs_aops;
- inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info;
- inode->i_op = &sysfs_inode_operations;
+ inode->i_mapping->a_ops = &kernfs_aops;
+ inode->i_mapping->backing_dev_info = &kernfs_bdi;
+ inode->i_op = &kernfs_iops;
set_default_inode_attr(inode, kn->mode);
sysfs_refresh_inode(kn, inode);
@@ -301,15 +301,15 @@ static void sysfs_init_inode(struct kernfs_node *kn, struct inode *inode)
/* initialize inode according to type */
switch (kernfs_type(kn)) {
case KERNFS_DIR:
- inode->i_op = &sysfs_dir_inode_operations;
- inode->i_fop = &sysfs_dir_operations;
+ inode->i_op = &kernfs_dir_iops;
+ inode->i_fop = &kernfs_dir_fops;
break;
case KERNFS_FILE:
inode->i_size = kn->attr.size;
- inode->i_fop = &kernfs_file_operations;
+ inode->i_fop = &kernfs_file_fops;
break;
case KERNFS_LINK:
- inode->i_op = &sysfs_symlink_inode_operations;
+ inode->i_op = &kernfs_symlink_iops;
break;
default:
BUG();
@@ -369,9 +369,9 @@ int sysfs_permission(struct inode *inode, int mask)
kn = inode->i_private;
- mutex_lock(&sysfs_mutex);
+ mutex_lock(&kernfs_mutex);
sysfs_refresh_inode(kn, inode);
- mutex_unlock(&sysfs_mutex);
+ mutex_unlock(&kernfs_mutex);
return generic_permission(inode, mask);
}