cifs: fix renaming one hardlink on top of another

cifs: fix renaming one hardlink on top of another

POSIX says that renaming one hardlink on top of another to the same
inode is a no-op. We had the logic mostly right, but forgot to clear
the return code.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

authored by Jeff Layton and committed by Steve French ae6884a9 61de800d

+3 -1
+3 -1
fs/cifs/inode.c
··· 1361 1361 CIFS_MOUNT_MAP_SPECIAL_CHR); 1362 1362 1363 1363 if (tmprc == 0 && (info_buf_source->UniqueId == 1364 - info_buf_target->UniqueId)) 1364 + info_buf_target->UniqueId)) { 1365 1365 /* same file, POSIX says that this is a noop */ 1366 + rc = 0; 1366 1367 goto cifs_rename_exit; 1368 + } 1367 1369 } /* else ... BB we could add the same check for Windows by 1368 1370 checking the UniqueId via FILE_INTERNAL_INFO */ 1369 1371