fix: move & hard link input/output error in 1.616 (Nicolò Chieffo, Szaka)
parent
78348655bd
commit
a81f30eaa6
|
@ -994,11 +994,15 @@ static int ntfs_fuse_link(const char *old_path, const char *new_path)
|
|||
if (ntfs_link(ni, dir_ni, uname, uname_len))
|
||||
res = -errno;
|
||||
exit:
|
||||
/*
|
||||
* Must close dir_ni first otherwise ntfs_inode_sync_file_name(ni)
|
||||
* may fail because ni may not be in parent's index on the disk yet.
|
||||
*/
|
||||
if (dir_ni && ntfs_inode_close(dir_ni))
|
||||
set_fuse_error(&res);
|
||||
if (ni && ntfs_inode_close(ni))
|
||||
set_fuse_error(&res);
|
||||
free(uname);
|
||||
if (dir_ni && ntfs_inode_close(dir_ni))
|
||||
set_fuse_error(&res);
|
||||
free(path);
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue