Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11836
b: refs/heads/master
c: e954365
h: refs/heads/master
v: v3
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Oct 31, 2005
1 parent 508da17 commit d8bf234
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: f12ec44070f6b4d1a3911fcf9917cf8f872a4daf
refs/heads/master: e9543659715602e3180f00a227bb6db34141ac41
17 changes: 10 additions & 7 deletions trunk/fs/proc/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,

WARN_ON(de && de->deleted);

if (de != NULL && !try_module_get(de->owner))
goto out_mod;

inode = iget(sb, ino);
if (!inode)
goto out_fail;
goto out_ino;

PROC_I(inode)->pde = de;
if (de) {
if (de->mode) {
Expand All @@ -171,20 +174,20 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
inode->i_size = de->size;
if (de->nlink)
inode->i_nlink = de->nlink;
if (!try_module_get(de->owner))
goto out_fail;
if (de->proc_iops)
inode->i_op = de->proc_iops;
if (de->proc_fops)
inode->i_fop = de->proc_fops;
}

out:
return inode;

out_fail:
out_ino:
if (de != NULL)
module_put(de->owner);
out_mod:
de_put(de);
goto out;
return NULL;
}

int proc_fill_super(struct super_block *s, void *data, int silent)
Expand Down

0 comments on commit d8bf234

Please sign in to comment.