* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage

of get_stat_handle () to get_handle ().  Add comment to explain why.
	* syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
This commit is contained in:
Corinna Vinschen 2010-08-20 08:52:25 +00:00
parent fb20493f3d
commit dd442880af
3 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2010-08-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage
of get_stat_handle () to get_handle (). Add comment to explain why.
* syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
2010-08-19 Corinna Vinschen <corinna@vinschen.de>
* external.cc (sync_wincwd): New function.

View File

@ -756,7 +756,11 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs)
IO_STATUS_BLOCK io;
FILE_FS_FULL_SIZE_INFORMATION full_fsi;
FILE_FS_SIZE_INFORMATION fsi;
HANDLE fh = get_stat_handle ();
/* We must not use the stat handle here, even if it exists. The handle
has been opened with FILE_OPEN_REPARSE_POINT, thus, in case of a volume
mount point, it points to the FS of the mount point, rather than to the
mounted FS. */
HANDLE fh = get_handle ();
if (!fh)
{

View File

@ -2568,8 +2568,7 @@ statvfs (const char *name, struct statvfs *sfs)
if (efault.faulted (EFAULT))
goto error;
if (!(fh = build_fh_name (name, PC_SYM_FOLLOW | PC_KEEP_HANDLE,
stat_suffixes)))
if (!(fh = build_fh_name (name, PC_SYM_FOLLOW, stat_suffixes)))
goto error;
if (fh->error ())