diff options
| author | Dave Airlie <airlied@starflyer.(none)> | 2005-09-25 13:14:45 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2005-09-25 13:14:45 +1000 |
| commit | 4e0c1159d83a658d1ffba5bc3442f4ec4cadb436 (patch) | |
| tree | 36a5079ba7ba9b9e0f2f633356705b980940eac4 /fs/proc/generic.c | |
| parent | ea98a92ff18c03bf7f4d21536986cbbcb4c10cd9 (diff) | |
| parent | ef6bd6eb90ad72ee8ee7ba8b271f27102e9a90c1 (diff) | |
update from upstream
Diffstat (limited to 'fs/proc/generic.c')
| -rw-r--r-- | fs/proc/generic.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index abe8920313fb..8a8c34461d48 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -249,6 +249,18 @@ out: 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, }; |
