1300 new_size = xtTruncate_pmap(tid, new_ip, new_size);
1301 if (new_size < 0) {
1302 txAbort(tid, 1);
1303 rc = new_size;
1304 } else
1305 rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC);
1306 txEnd(tid);
1307 mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
1308 }
1309 if (new_ip && (new_ip->i_nlink == 0))
1310 set_cflag(COMMIT_Nolink, new_ip);
1311 out3:
1312 free_UCSname(&new_dname);
1313 out2:
1314 free_UCSname(&old_dname);
1315 out1:
1316 if (new_ip && !S_ISDIR(new_ip->i_mode))
1317 IWRITE_UNLOCK(new_ip);
1318
1319
1320
1321
1322 if (test_cflag(COMMIT_Stale, old_dir)) {
1323 if (old_dir->i_size > 1)
1324 jfs_truncate_nolock(old_dir, 0);
1325
1326 clear_cflag(COMMIT_Stale, old_dir);
1327 }
1328
1329 jfs_info("jfs_rename: returning %d", rc);
1330 return rc;
1331}
1332
1333
1334
1335
1336
1337
1338
1339static int jfs_mknod(struct inode *dir, struct dentry *dentry,
1340 int mode, dev_t rdev)