diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_imap.c | 6 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.c | 2 | ||||
-rw-r--r-- | fs/jfs/namei.c | 12 | ||||
-rw-r--r-- | fs/jfs/super.c | 1 |
4 files changed, 10 insertions, 11 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) |
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index 2686531e235a..c1a3e603279c 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c | |||
@@ -157,7 +157,7 @@ fail_drop: | |||
157 | dquot_drop(inode); | 157 | dquot_drop(inode); |
158 | inode->i_flags |= S_NOQUOTA; | 158 | inode->i_flags |= S_NOQUOTA; |
159 | fail_unlock: | 159 | fail_unlock: |
160 | inode->i_nlink = 0; | 160 | clear_nlink(inode); |
161 | unlock_new_inode(inode); | 161 | unlock_new_inode(inode); |
162 | fail_put: | 162 | fail_put: |
163 | iput(inode); | 163 | iput(inode); |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index e17545e15664..a112ad96e474 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -172,7 +172,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, | |||
172 | mutex_unlock(&JFS_IP(dip)->commit_mutex); | 172 | mutex_unlock(&JFS_IP(dip)->commit_mutex); |
173 | if (rc) { | 173 | if (rc) { |
174 | free_ea_wmap(ip); | 174 | free_ea_wmap(ip); |
175 | ip->i_nlink = 0; | 175 | clear_nlink(ip); |
176 | unlock_new_inode(ip); | 176 | unlock_new_inode(ip); |
177 | iput(ip); | 177 | iput(ip); |
178 | } else { | 178 | } else { |
@@ -292,7 +292,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) | |||
292 | goto out3; | 292 | goto out3; |
293 | } | 293 | } |
294 | 294 | ||
295 | ip->i_nlink = 2; /* for '.' */ | 295 | set_nlink(ip, 2); /* for '.' */ |
296 | ip->i_op = &jfs_dir_inode_operations; | 296 | ip->i_op = &jfs_dir_inode_operations; |
297 | ip->i_fop = &jfs_dir_operations; | 297 | ip->i_fop = &jfs_dir_operations; |
298 | 298 | ||
@@ -311,7 +311,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) | |||
311 | mutex_unlock(&JFS_IP(dip)->commit_mutex); | 311 | mutex_unlock(&JFS_IP(dip)->commit_mutex); |
312 | if (rc) { | 312 | if (rc) { |
313 | free_ea_wmap(ip); | 313 | free_ea_wmap(ip); |
314 | ip->i_nlink = 0; | 314 | clear_nlink(ip); |
315 | unlock_new_inode(ip); | 315 | unlock_new_inode(ip); |
316 | iput(ip); | 316 | iput(ip); |
317 | } else { | 317 | } else { |
@@ -844,7 +844,7 @@ static int jfs_link(struct dentry *old_dentry, | |||
844 | rc = txCommit(tid, 2, &iplist[0], 0); | 844 | rc = txCommit(tid, 2, &iplist[0], 0); |
845 | 845 | ||
846 | if (rc) { | 846 | if (rc) { |
847 | ip->i_nlink--; /* never instantiated */ | 847 | drop_nlink(ip); /* never instantiated */ |
848 | iput(ip); | 848 | iput(ip); |
849 | } else | 849 | } else |
850 | d_instantiate(dentry, ip); | 850 | d_instantiate(dentry, ip); |
@@ -1048,7 +1048,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
1048 | mutex_unlock(&JFS_IP(dip)->commit_mutex); | 1048 | mutex_unlock(&JFS_IP(dip)->commit_mutex); |
1049 | if (rc) { | 1049 | if (rc) { |
1050 | free_ea_wmap(ip); | 1050 | free_ea_wmap(ip); |
1051 | ip->i_nlink = 0; | 1051 | clear_nlink(ip); |
1052 | unlock_new_inode(ip); | 1052 | unlock_new_inode(ip); |
1053 | iput(ip); | 1053 | iput(ip); |
1054 | } else { | 1054 | } else { |
@@ -1433,7 +1433,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry, | |||
1433 | mutex_unlock(&JFS_IP(dir)->commit_mutex); | 1433 | mutex_unlock(&JFS_IP(dir)->commit_mutex); |
1434 | if (rc) { | 1434 | if (rc) { |
1435 | free_ea_wmap(ip); | 1435 | free_ea_wmap(ip); |
1436 | ip->i_nlink = 0; | 1436 | clear_nlink(ip); |
1437 | unlock_new_inode(ip); | 1437 | unlock_new_inode(ip); |
1438 | iput(ip); | 1438 | iput(ip); |
1439 | } else { | 1439 | } else { |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 06c8a67cbe76..a44eff076c17 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -485,7 +485,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
485 | goto out_unload; | 485 | goto out_unload; |
486 | } | 486 | } |
487 | inode->i_ino = 0; | 487 | inode->i_ino = 0; |
488 | inode->i_nlink = 1; | ||
489 | inode->i_size = sb->s_bdev->bd_inode->i_size; | 488 | inode->i_size = sb->s_bdev->bd_inode->i_size; |
490 | inode->i_mapping->a_ops = &jfs_metapage_aops; | 489 | inode->i_mapping->a_ops = &jfs_metapage_aops; |
491 | insert_inode_hash(inode); | 490 | insert_inode_hash(inode); |