Fixed avoidance of a double opening of an inode in create()
parent
b46c8daad5
commit
61f7084020
|
@ -668,11 +668,8 @@ static int ntfs_inode_sync_file_name(ntfs_inode *ni)
|
|||
}
|
||||
ntfs_index_entry_mark_dirty(ictx);
|
||||
ntfs_index_ctx_put(ictx);
|
||||
if (ni != index_ni) {
|
||||
ntfs_inode_update_times(index_ni, NTFS_UPDATE_CTIME);
|
||||
if (ntfs_inode_close(index_ni) && !err)
|
||||
err = errno;
|
||||
}
|
||||
if ((ni != index_ni) && ntfs_inode_close(index_ni) && !err)
|
||||
err = errno;
|
||||
}
|
||||
/* Check for real error occurred. */
|
||||
if (errno != ENOENT) {
|
||||
|
|
|
@ -1466,8 +1466,8 @@ static int ntfs_fuse_create(const char *org_path, mode_t typemode, dev_t dev,
|
|||
NInoSetDirty(ni);
|
||||
/*
|
||||
* closing ni will necessitate to open dir_ni to
|
||||
* synchronize the index, which will update the change
|
||||
* time again. Better avoid a dangerous double opening.
|
||||
* synchronize the index.
|
||||
* Better avoid a dangerous double opening.
|
||||
*/
|
||||
ntfs_fuse_update_times(dir_ni, NTFS_UPDATE_MCTIME);
|
||||
if (ntfs_inode_close(dir_ni))
|
||||
|
|
Loading…
Reference in New Issue