Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254985
b: refs/heads/master
c: 3cc0658
h: refs/heads/master
i:
  254983: eff5a5a
v: v3
  • Loading branch information
Al Viro committed Jul 18, 2011
1 parent 4ebf1e8 commit 6f3825a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 0577d1ba411f9c40693b8b3e4aa7e0892cd03091
refs/heads/master: 3cc0658e35124ace881f6942839dcae877c3eaed
12 changes: 6 additions & 6 deletions trunk/fs/hppfs/hppfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,11 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
err = -ENOMEM;
inode = get_inode(ino->i_sb, proc_dentry);
if (!inode)
goto out_dput;
goto out;

d_add(dentry, inode);
return NULL;

out_dput:
dput(proc_dentry);
out:
return ERR_PTR(err);
}
Expand Down Expand Up @@ -690,8 +688,10 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
struct inode *proc_ino = dentry->d_inode;
struct inode *inode = new_inode(sb);

if (!inode)
if (!inode) {
dput(dentry);
return ERR_PTR(-ENOMEM);
}

if (S_ISDIR(dentry->d_inode->i_mode)) {
inode->i_op = &hppfs_dir_iops;
Expand All @@ -704,7 +704,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
inode->i_fop = &hppfs_file_fops;
}

HPPFS_I(inode)->proc_dentry = dget(dentry);
HPPFS_I(inode)->proc_dentry = dentry;

inode->i_uid = proc_ino->i_uid;
inode->i_gid = proc_ino->i_gid;
Expand Down Expand Up @@ -737,7 +737,7 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
sb->s_fs_info = proc_mnt;

err = -ENOMEM;
root_inode = get_inode(sb, proc_mnt->mnt_sb->s_root);
root_inode = get_inode(sb, dget(proc_mnt->mnt_sb->s_root));
if (!root_inode)
goto out_mntput;

Expand Down

0 comments on commit 6f3825a

Please sign in to comment.