diff --git a/[refs] b/[refs] index d0082ce4814d..c669bc806d51 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 230649da7cb73914b8b2a1ffc802a2951e970454 +refs/heads/master: 2b579beec255d6589fabe51b60933d723630bcd4 diff --git a/trunk/fs/proc/generic.c b/trunk/fs/proc/generic.c index abe8920313fb..8a8c34461d48 100644 --- a/trunk/fs/proc/generic.c +++ b/trunk/fs/proc/generic.c @@ -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, }; @@ -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, };