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/ocfs2/dir.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/ocfs2/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 8582e3f4f120..e2878b5895fb 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -2292,7 +2292,7 @@ static int ocfs2_fill_new_dir_id(struct ocfs2_super *osb, | |||
2292 | ocfs2_journal_dirty(handle, di_bh); | 2292 | ocfs2_journal_dirty(handle, di_bh); |
2293 | 2293 | ||
2294 | i_size_write(inode, size); | 2294 | i_size_write(inode, size); |
2295 | inode->i_nlink = 2; | 2295 | set_nlink(inode, 2); |
2296 | inode->i_blocks = ocfs2_inode_sector_count(inode); | 2296 | inode->i_blocks = ocfs2_inode_sector_count(inode); |
2297 | 2297 | ||
2298 | ret = ocfs2_mark_inode_dirty(handle, inode, di_bh); | 2298 | ret = ocfs2_mark_inode_dirty(handle, inode, di_bh); |
@@ -2354,7 +2354,7 @@ static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb, | |||
2354 | ocfs2_journal_dirty(handle, new_bh); | 2354 | ocfs2_journal_dirty(handle, new_bh); |
2355 | 2355 | ||
2356 | i_size_write(inode, inode->i_sb->s_blocksize); | 2356 | i_size_write(inode, inode->i_sb->s_blocksize); |
2357 | inode->i_nlink = 2; | 2357 | set_nlink(inode, 2); |
2358 | inode->i_blocks = ocfs2_inode_sector_count(inode); | 2358 | inode->i_blocks = ocfs2_inode_sector_count(inode); |
2359 | status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); | 2359 | status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); |
2360 | if (status < 0) { | 2360 | if (status < 0) { |