diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-10-28 08:13:29 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@serles.lst.de> | 2011-11-02 07:53:43 -0400 |
commit | bfe8684869601dacfcb2cd69ef8cfd9045f62170 (patch) | |
tree | 4e213aaa766b26f43f0f9ec7998a7745239d9377 /fs/proc/base.c | |
parent | 6d6b77f163c7eabedbba00ed2abb7d4a570bff76 (diff) |
filesystems: add set_nlink()
Replace remaining direct i_nlink updates with a new set_nlink()
updater function.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8f0087e20e16..851ba3dcdc29 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2248,7 +2248,7 @@ static struct dentry *proc_pident_instantiate(struct inode *dir, | |||
2248 | ei = PROC_I(inode); | 2248 | ei = PROC_I(inode); |
2249 | inode->i_mode = p->mode; | 2249 | inode->i_mode = p->mode; |
2250 | if (S_ISDIR(inode->i_mode)) | 2250 | if (S_ISDIR(inode->i_mode)) |
2251 | inode->i_nlink = 2; /* Use getattr to fix if necessary */ | 2251 | set_nlink(inode, 2); /* Use getattr to fix if necessary */ |
2252 | if (p->iop) | 2252 | if (p->iop) |
2253 | inode->i_op = p->iop; | 2253 | inode->i_op = p->iop; |
2254 | if (p->fop) | 2254 | if (p->fop) |
@@ -2642,7 +2642,7 @@ static struct dentry *proc_base_instantiate(struct inode *dir, | |||
2642 | 2642 | ||
2643 | inode->i_mode = p->mode; | 2643 | inode->i_mode = p->mode; |
2644 | if (S_ISDIR(inode->i_mode)) | 2644 | if (S_ISDIR(inode->i_mode)) |
2645 | inode->i_nlink = 2; | 2645 | set_nlink(inode, 2); |
2646 | if (S_ISLNK(inode->i_mode)) | 2646 | if (S_ISLNK(inode->i_mode)) |
2647 | inode->i_size = 64; | 2647 | inode->i_size = 64; |
2648 | if (p->iop) | 2648 | if (p->iop) |
@@ -2981,8 +2981,8 @@ static struct dentry *proc_pid_instantiate(struct inode *dir, | |||
2981 | inode->i_fop = &proc_tgid_base_operations; | 2981 | inode->i_fop = &proc_tgid_base_operations; |
2982 | inode->i_flags|=S_IMMUTABLE; | 2982 | inode->i_flags|=S_IMMUTABLE; |
2983 | 2983 | ||
2984 | inode->i_nlink = 2 + pid_entry_count_dirs(tgid_base_stuff, | 2984 | set_nlink(inode, 2 + pid_entry_count_dirs(tgid_base_stuff, |
2985 | ARRAY_SIZE(tgid_base_stuff)); | 2985 | ARRAY_SIZE(tgid_base_stuff))); |
2986 | 2986 | ||
2987 | d_set_d_op(dentry, &pid_dentry_operations); | 2987 | d_set_d_op(dentry, &pid_dentry_operations); |
2988 | 2988 | ||
@@ -3233,8 +3233,8 @@ static struct dentry *proc_task_instantiate(struct inode *dir, | |||
3233 | inode->i_fop = &proc_tid_base_operations; | 3233 | inode->i_fop = &proc_tid_base_operations; |
3234 | inode->i_flags|=S_IMMUTABLE; | 3234 | inode->i_flags|=S_IMMUTABLE; |
3235 | 3235 | ||
3236 | inode->i_nlink = 2 + pid_entry_count_dirs(tid_base_stuff, | 3236 | set_nlink(inode, 2 + pid_entry_count_dirs(tid_base_stuff, |
3237 | ARRAY_SIZE(tid_base_stuff)); | 3237 | ARRAY_SIZE(tid_base_stuff))); |
3238 | 3238 | ||
3239 | d_set_d_op(dentry, &pid_dentry_operations); | 3239 | d_set_d_op(dentry, &pid_dentry_operations); |
3240 | 3240 | ||