* Makefile.in (DLL_OFILES): Remove delqueue.o.
* delqueue.cc: Delete. * fhandler.h (fhandler_base::close_fs): Drop declaration. (fhandler_disk_file::close): Drop declaration. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Call close instead of close_fs. (fhandler_base::fstat_helper): Use open FH_UNIX handle in call to get_file_attribute. (fhandler_base::open_fs): Call close instead of get_file_attribute. (fhandler_disk_file::close): Remove. (fhandler_base::close_fs): Remove. * fhandler_socket.cc (fhandler_socket::close): Just call fhandler_base::close for FH_UNIX sockets. * shared.cc (user_shared_initialize): Drop call to user_shared->delqueue.init. * shared_info.h (CURR_USER_MAGIC): Change according to below change. (MAX_DELQUEUES_PENDING): Remove. (class delqueue_list): Remove. (class user_info): Remove delqueue. * syscalls.cc (close_all_files): Drop call to user_shared->delqueue.process_queue. (unlink): Drop delqueue handling.
This commit is contained in:
@ -432,12 +432,12 @@ fhandler_base::fstat_fs (struct __stat64 *buf)
|
||||
{
|
||||
/* We now have a valid handle, regardless of the "nohandle" state.
|
||||
Since fhandler_base::open only calls CloseHandle if !nohandle,
|
||||
we have to set it to false before calling close_fs and restore
|
||||
we have to set it to false before calling close and restore
|
||||
the state afterwards. */
|
||||
res = fstat_by_handle (buf);
|
||||
bool no_handle = nohandle ();
|
||||
nohandle (false);
|
||||
close_fs ();
|
||||
close ();
|
||||
nohandle (no_handle);
|
||||
set_io_handle (NULL);
|
||||
}
|
||||
@ -528,7 +528,8 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
|
||||
else if (pc.issocket ())
|
||||
buf->st_mode = S_IFSOCK;
|
||||
|
||||
if (!get_file_attribute (is_fs_special () ? NULL: get_handle (), pc,
|
||||
if (!get_file_attribute (is_fs_special () && !pc.issocket ()
|
||||
? NULL : get_handle (), pc,
|
||||
&buf->st_mode, &buf->st_uid, &buf->st_gid))
|
||||
{
|
||||
/* If read-only attribute is set, modify ntsec return value */
|
||||
@ -1256,7 +1257,7 @@ fhandler_base::open_fs (int flags, mode_t mode)
|
||||
if (pc.has_buggy_open () && !pc.exists ())
|
||||
{
|
||||
debug_printf ("Buggy open detected.");
|
||||
close_fs ();
|
||||
close ();
|
||||
set_errno (ENOENT);
|
||||
return 0;
|
||||
}
|
||||
@ -1269,21 +1270,6 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_disk_file::close ()
|
||||
{
|
||||
return close_fs ();
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_base::close_fs ()
|
||||
{
|
||||
int res = fhandler_base::close ();
|
||||
if (!res)
|
||||
user_shared->delqueue.process_queue ();
|
||||
return res;
|
||||
}
|
||||
|
||||
ssize_t __stdcall
|
||||
fhandler_disk_file::pread (void *buf, size_t count, _off64_t offset)
|
||||
{
|
||||
|
Reference in New Issue
Block a user