aboutsummaryrefslogtreecommitdiffstats
path: root/fs/configfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r--fs/configfs/dir.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 5ddd7ebd9dcd..b0fbcbeb03ee 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -1183,11 +1183,6 @@ static int configfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
1183 struct module *subsys_owner = NULL, *new_item_owner = NULL; 1183 struct module *subsys_owner = NULL, *new_item_owner = NULL;
1184 char *name; 1184 char *name;
1185 1185
1186 if (dentry->d_parent == configfs_sb->s_root) {
1187 ret = -EPERM;
1188 goto out;
1189 }
1190
1191 sd = dentry->d_parent->d_fsdata; 1186 sd = dentry->d_parent->d_fsdata;
1192 1187
1193 /* 1188 /*
@@ -1359,9 +1354,6 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry)
1359 struct module *subsys_owner = NULL, *dead_item_owner = NULL; 1354 struct module *subsys_owner = NULL, *dead_item_owner = NULL;
1360 int ret; 1355 int ret;
1361 1356
1362 if (dentry->d_parent == configfs_sb->s_root)
1363 return -EPERM;
1364
1365 sd = dentry->d_fsdata; 1357 sd = dentry->d_fsdata;
1366 if (sd->s_type & CONFIGFS_USET_DEFAULT) 1358 if (sd->s_type & CONFIGFS_USET_DEFAULT)
1367 return -EPERM; 1359 return -EPERM;
@@ -1459,6 +1451,11 @@ const struct inode_operations configfs_dir_inode_operations = {
1459 .setattr = configfs_setattr, 1451 .setattr = configfs_setattr,
1460}; 1452};
1461 1453
1454const struct inode_operations configfs_root_inode_operations = {
1455 .lookup = configfs_lookup,
1456 .setattr = configfs_setattr,
1457};
1458
1462#if 0 1459#if 0
1463int configfs_rename_dir(struct config_item * item, const char *new_name) 1460int configfs_rename_dir(struct config_item * item, const char *new_name)
1464{ 1461{