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/affs/inode.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/affs/inode.c')
-rw-r--r-- | fs/affs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 5d828903ac69..88a4b0b50058 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c | |||
@@ -54,7 +54,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino) | |||
54 | prot = be32_to_cpu(tail->protect); | 54 | prot = be32_to_cpu(tail->protect); |
55 | 55 | ||
56 | inode->i_size = 0; | 56 | inode->i_size = 0; |
57 | inode->i_nlink = 1; | 57 | set_nlink(inode, 1); |
58 | inode->i_mode = 0; | 58 | inode->i_mode = 0; |
59 | AFFS_I(inode)->i_extcnt = 1; | 59 | AFFS_I(inode)->i_extcnt = 1; |
60 | AFFS_I(inode)->i_ext_last = ~1; | 60 | AFFS_I(inode)->i_ext_last = ~1; |
@@ -137,7 +137,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino) | |||
137 | sbi->s_hashsize + 1; | 137 | sbi->s_hashsize + 1; |
138 | } | 138 | } |
139 | if (tail->link_chain) | 139 | if (tail->link_chain) |
140 | inode->i_nlink = 2; | 140 | set_nlink(inode, 2); |
141 | inode->i_mapping->a_ops = (sbi->s_flags & SF_OFS) ? &affs_aops_ofs : &affs_aops; | 141 | inode->i_mapping->a_ops = (sbi->s_flags & SF_OFS) ? &affs_aops_ofs : &affs_aops; |
142 | inode->i_op = &affs_file_inode_operations; | 142 | inode->i_op = &affs_file_inode_operations; |
143 | inode->i_fop = &affs_file_operations; | 143 | inode->i_fop = &affs_file_operations; |
@@ -304,7 +304,7 @@ affs_new_inode(struct inode *dir) | |||
304 | inode->i_uid = current_fsuid(); | 304 | inode->i_uid = current_fsuid(); |
305 | inode->i_gid = current_fsgid(); | 305 | inode->i_gid = current_fsgid(); |
306 | inode->i_ino = block; | 306 | inode->i_ino = block; |
307 | inode->i_nlink = 1; | 307 | set_nlink(inode, 1); |
308 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; | 308 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; |
309 | atomic_set(&AFFS_I(inode)->i_opencnt, 0); | 309 | atomic_set(&AFFS_I(inode)->i_opencnt, 0); |
310 | AFFS_I(inode)->i_blkcnt = 0; | 310 | AFFS_I(inode)->i_blkcnt = 0; |
@@ -387,7 +387,7 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3 | |||
387 | AFFS_TAIL(sb, inode_bh)->link_chain = cpu_to_be32(block); | 387 | AFFS_TAIL(sb, inode_bh)->link_chain = cpu_to_be32(block); |
388 | affs_adjust_checksum(inode_bh, block - be32_to_cpu(chain)); | 388 | affs_adjust_checksum(inode_bh, block - be32_to_cpu(chain)); |
389 | mark_buffer_dirty_inode(inode_bh, inode); | 389 | mark_buffer_dirty_inode(inode_bh, inode); |
390 | inode->i_nlink = 2; | 390 | set_nlink(inode, 2); |
391 | ihold(inode); | 391 | ihold(inode); |
392 | } | 392 | } |
393 | affs_fix_checksum(sb, bh); | 393 | affs_fix_checksum(sb, bh); |