Skip to content

Commit

Permalink
Drop useless calls to path_conv.isgood_inode
Browse files Browse the repository at this point in the history
Signed-off-by: Corinna Vinschen <[email protected]>
  • Loading branch information
github-cygwin committed Jun 21, 2016
1 parent 4965cdc commit 2c83227
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions winsup/cygwin/fhandler_disk_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
return -1;
}
}
if (pc.hasgood_inode ()
&& pc.isgood_inode (pc.fai ()->InternalInformation.IndexNumber.QuadPart))
if (pc.isgood_inode (pc.fai ()->InternalInformation.IndexNumber.QuadPart))
ino = pc.fai ()->InternalInformation.IndexNumber.QuadPart;
return fstat_helper (buf);
}
Expand Down Expand Up @@ -463,10 +462,7 @@ fhandler_base::fstat_helper (struct stat *buf)
buf->st_nlink = pc.fai()->StandardInformation.NumberOfLinks;

/* Enforce namehash as inode number on untrusted file systems. */
if (ino && pc.isgood_inode (ino))
buf->st_ino = (ino_t) ino;
else
buf->st_ino = get_ino ();
buf->st_ino = ino ?: get_ino ();

buf->st_blksize = PREFERRED_IO_BLKSIZE;

Expand Down

0 comments on commit 2c83227

Please sign in to comment.