What happens to destination inode if it already exists in mv command
I am interested in knowing what happens in the following case.
file1 exists as /home/file1.txt on disk
file2 exists as /home/file2.txt on disk
file1 and file2 both have inode's. when the following command issued,
#mv /home/file1.txt /home/file2.txt
The rename operation happens on the same filesystem and on the same directory, but what will happen to file2's inode? and what are file system operations?
I googled but I couldn't fine anywhere. :(
I am trying to understand the code. Please help in understanding "what happens to destination inode when mv command issued on the same filesystem and same directory?".
Thanks in advance.