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/ufs | |
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/ufs')
-rw-r--r-- | fs/ufs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index b4d791a83207..879b13436fa4 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -589,7 +589,7 @@ static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) | |||
589 | * Copy data to the in-core inode. | 589 | * Copy data to the in-core inode. |
590 | */ | 590 | */ |
591 | inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode); | 591 | inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode); |
592 | inode->i_nlink = fs16_to_cpu(sb, ufs_inode->ui_nlink); | 592 | set_nlink(inode, fs16_to_cpu(sb, ufs_inode->ui_nlink)); |
593 | if (inode->i_nlink == 0) { | 593 | if (inode->i_nlink == 0) { |
594 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); | 594 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); |
595 | return -1; | 595 | return -1; |
@@ -637,7 +637,7 @@ static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) | |||
637 | * Copy data to the in-core inode. | 637 | * Copy data to the in-core inode. |
638 | */ | 638 | */ |
639 | inode->i_mode = mode = fs16_to_cpu(sb, ufs2_inode->ui_mode); | 639 | inode->i_mode = mode = fs16_to_cpu(sb, ufs2_inode->ui_mode); |
640 | inode->i_nlink = fs16_to_cpu(sb, ufs2_inode->ui_nlink); | 640 | set_nlink(inode, fs16_to_cpu(sb, ufs2_inode->ui_nlink)); |
641 | if (inode->i_nlink == 0) { | 641 | if (inode->i_nlink == 0) { |
642 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); | 642 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); |
643 | return -1; | 643 | return -1; |