Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292364
b: refs/heads/master
c: 0dd6c08
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 21, 2012
1 parent faf8a44 commit f8cae24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16d13b59b5b85ebc91de6c889716fa6e7766237f
refs/heads/master: 0dd6c08a0042ed83037cf5c772d9066e33046427
20 changes: 5 additions & 15 deletions trunk/fs/configfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,13 @@ static int init_symlink(struct inode * inode)
return 0;
}

static int create_dir(struct config_item * k, struct dentry * p,
struct dentry * d)
static int create_dir(struct config_item *k, struct dentry *d)
{
int error;
umode_t mode = S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO;
struct dentry *p = d->d_parent;

BUG_ON(!k);

error = configfs_dirent_exists(p->d_fsdata, d->d_name.name);
if (!error)
Expand Down Expand Up @@ -304,19 +306,7 @@ static int create_dir(struct config_item * k, struct dentry * p,

static int configfs_create_dir(struct config_item * item, struct dentry *dentry)
{
struct dentry * parent;
int error = 0;

BUG_ON(!item);

if (item->ci_parent)
parent = item->ci_parent->ci_dentry;
else if (configfs_mount)
parent = configfs_mount->mnt_root;
else
return -EFAULT;

error = create_dir(item,parent,dentry);
int error = create_dir(item, dentry);
if (!error)
item->ci_dentry = dentry;
return error;
Expand Down

0 comments on commit f8cae24

Please sign in to comment.