aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/namei.c')
-rw-r--r--fs/jfs/namei.c12
1 files changed, 6 insertions, 6 deletions
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 {