Commits

Anonymous committed 240369b

Build fixes

Comments (0)

Files changed (1)

 	struct inode *new_inode = new_dentry->d_inode;
 	struct buffer_head *old_buffer, *new_buffer;
 	tux_dirent *old_de, *new_de = NULL;
+	int err = -ENOENT;
 
 	old_de = tux_find_entry(old_dir, old_dentry->d_name.name,
 		old_dentry->d_name.len, &old_buffer);
 		return PTR_ERR(old_de);
 
 	if (new_inode) {
-		int err = -ENOTEMPTY;
+		err = -ENOTEMPTY;
 		if (!tux_dir_is_empty(new_inode))
 			return err;
 
 		new_de = tux_find_entry(new_dir, new_dentry->d_name.name,
 			new_dentry->d_name.len, &new_buffer);
-		if IS_ERR(new_de))
+		if (IS_ERR(new_de))
 			return PTR_ERR(old_de);
 
 		if ((err = tux_delete_entry(new_buffer, new_de)))
 		if (err)
 			return err;
 	}
-	old_inode->i_ctime = CURRENT_TIME_SEC;
+	old_inode->i_ctime = gettime();
 	tux_delete_entry(old_buffer, old_de);
 	return err;
 }