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/jfs/jfs_imap.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/jfs/jfs_imap.c')
-rw-r--r-- | fs/jfs/jfs_imap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index b78b2f978f04..1b6f15f191b3 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -457,7 +457,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) | |||
457 | /* read the page of fixed disk inode (AIT) in raw mode */ | 457 | /* read the page of fixed disk inode (AIT) in raw mode */ |
458 | mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); | 458 | mp = read_metapage(ip, address << sbi->l2nbperpage, PSIZE, 1); |
459 | if (mp == NULL) { | 459 | if (mp == NULL) { |
460 | ip->i_nlink = 1; /* Don't want iput() deleting it */ | 460 | set_nlink(ip, 1); /* Don't want iput() deleting it */ |
461 | iput(ip); | 461 | iput(ip); |
462 | return (NULL); | 462 | return (NULL); |
463 | } | 463 | } |
@@ -469,7 +469,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) | |||
469 | /* copy on-disk inode to in-memory inode */ | 469 | /* copy on-disk inode to in-memory inode */ |
470 | if ((copy_from_dinode(dp, ip)) != 0) { | 470 | if ((copy_from_dinode(dp, ip)) != 0) { |
471 | /* handle bad return by returning NULL for ip */ | 471 | /* handle bad return by returning NULL for ip */ |
472 | ip->i_nlink = 1; /* Don't want iput() deleting it */ | 472 | set_nlink(ip, 1); /* Don't want iput() deleting it */ |
473 | iput(ip); | 473 | iput(ip); |
474 | /* release the page */ | 474 | /* release the page */ |
475 | release_metapage(mp); | 475 | release_metapage(mp); |
@@ -3076,7 +3076,7 @@ static int copy_from_dinode(struct dinode * dip, struct inode *ip) | |||
3076 | ip->i_mode |= 0001; | 3076 | ip->i_mode |= 0001; |
3077 | } | 3077 | } |
3078 | } | 3078 | } |
3079 | ip->i_nlink = le32_to_cpu(dip->di_nlink); | 3079 | set_nlink(ip, le32_to_cpu(dip->di_nlink)); |
3080 | 3080 | ||
3081 | jfs_ip->saved_uid = le32_to_cpu(dip->di_uid); | 3081 | jfs_ip->saved_uid = le32_to_cpu(dip->di_uid); |
3082 | if (sbi->uid == -1) | 3082 | if (sbi->uid == -1) |