Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359195
b: refs/heads/master
c: 87e0aab
h: refs/heads/master
i:
  359193: 1ad8bca
  359191: 46095a5
v: v3
  • Loading branch information
Maxim Patlasov authored and Al Viro committed Feb 26, 2013
1 parent a8bcd0f commit 3e8db1d
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 41735818766c0ec215b9a69591e7eae642061954
refs/heads/master: 87e0aab37ff6c4284810a48d6034314fbf4eb319
21 changes: 15 additions & 6 deletions trunk/fs/proc/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)

int proc_fill_super(struct super_block *s)
{
struct inode *root_inode;

s->s_flags |= MS_NODIRATIME | MS_NOSUID | MS_NOEXEC;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
Expand All @@ -494,11 +496,18 @@ int proc_fill_super(struct super_block *s)
s->s_time_gran = 1;

pde_get(&proc_root);
s->s_root = d_make_root(proc_get_inode(s, &proc_root));
if (s->s_root)
return 0;
root_inode = proc_get_inode(s, &proc_root);
if (!root_inode) {
printk(KERN_ERR "proc_fill_super: get root inode failed\n");
pde_put(&proc_root);
return -ENOMEM;
}

printk("proc_read_super: get root inode failed\n");
pde_put(&proc_root);
return -ENOMEM;
s->s_root = d_make_root(root_inode);
if (!s->s_root) {
printk(KERN_ERR "proc_fill_super: allocate dentry failed\n");
return -ENOMEM;
}

return 0;
}

0 comments on commit 3e8db1d

Please sign in to comment.