* mount.h (class fs_info): Add has_buggy_reopen flag and accessor
methods. * mount.cc (fs_info::update): Set has_buggy_reopen flag for NWFS. Add comment. * path.h (path_conv::get_object_attr) Make inline method. (path_conv::init_reopen_attr): New inline method. * path.cc (path_conv::get_object_attr): Remove. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Use path_conv::init_reopen_attr method to initialize OBJECT_ATTRIBUTE for reopening file. (fhandler_disk_file::fchmod): Ditto. (fhandler_base::utimens_fs): Ditto. (fhandler_disk_file::rewinddir): Ditto. * syscalls.cc (unlink_nt): Ditto.
This commit is contained in:
@@ -569,8 +569,7 @@ unlink_nt (path_conv &pc)
|
||||
{
|
||||
NtSetAttributesFile (fh_ro, pc.file_attributes ()
|
||||
& ~FILE_ATTRIBUTE_READONLY);
|
||||
InitializeObjectAttributes (&attr, &ro_u_empty,
|
||||
pc.objcaseinsensitive (), fh_ro, NULL);
|
||||
pc.init_reopen_attr (&attr, fh_ro);
|
||||
}
|
||||
if (pc.is_lnk_symlink ())
|
||||
{
|
||||
@@ -688,7 +687,7 @@ unlink_nt (path_conv &pc)
|
||||
|
||||
/* Re-open from handle so we open the correct file no matter if it
|
||||
has been moved to the bin or not. */
|
||||
InitializeObjectAttributes (&attr, &ro_u_empty, 0, fh, NULL);
|
||||
pc.init_reopen_attr (&attr, fh);
|
||||
status = NtOpenFile (&fh2, DELETE, &attr, &io,
|
||||
bin_stat == move_to_bin ? FILE_SHARE_VALID_FLAGS
|
||||
: FILE_SHARE_DELETE,
|
||||
|
Reference in New Issue
Block a user