Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7371
b: refs/heads/master
c: 2b579be
h: refs/heads/master
i:
  7369: 26bc7d9
  7367: 2d8e76e
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Sep 7, 2005
1 parent ef28ec1 commit d86bc17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 230649da7cb73914b8b2a1ffc802a2951e970454
refs/heads/master: 2b579beec255d6589fabe51b60933d723630bcd4
13 changes: 13 additions & 0 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
return error;
}

static int proc_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
struct proc_dir_entry *de = PROC_I(inode)->pde;
if (de && de->nlink)
inode->i_nlink = de->nlink;

generic_fillattr(inode, stat);
return 0;
}

static struct inode_operations proc_file_inode_operations = {
.setattr = proc_notify_change,
};
Expand Down Expand Up @@ -475,6 +487,7 @@ static struct file_operations proc_dir_operations = {
*/
static struct inode_operations proc_dir_inode_operations = {
.lookup = proc_lookup,
.getattr = proc_getattr,
.setattr = proc_notify_change,
};

Expand Down

0 comments on commit d86bc17

Please sign in to comment.