summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2002-08-02 06:19:43 +0000
committerscottl <scottl@FreeBSD.org>2002-08-02 06:19:43 +0000
commitf27f293d96cd04c95d4bb2908932d5e5397a7bc9 (patch)
tree599abf683f40f8181a62c5265e5b51a96ca77cd2
parent69425db61b078184b18c397d45b84d749a6f0b0c (diff)
downloadFreeBSD-src-f27f293d96cd04c95d4bb2908932d5e5397a7bc9.zip
FreeBSD-src-f27f293d96cd04c95d4bb2908932d5e5397a7bc9.tar.gz
Check for deleted files in udf_lookup(), not just udf_readdir().
Submitted by: tes@sgi.com
-rw-r--r--sys/fs/udf/udf_vnops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c
index 0222a74..31f006f 100644
--- a/sys/fs/udf/udf_vnops.c
+++ b/sys/fs/udf/udf_vnops.c
@@ -965,7 +965,11 @@ lookloop:
/* XXX Should we return an error on a bad fid? */
if (udf_checktag(&fid->tag, TAGID_FID))
- break;
+ goto continue_lookup;
+
+ /* Is this a deleted file? */
+ if (fid->file_char & 0x4)
+ goto continue_lookup;
if ((fid->l_fi == 0) && (fid->file_char & 0x08)) {
if (flags & ISDOTDOT) {
@@ -985,6 +989,7 @@ lookloop:
* looking for. It's therefore safe to clean up from a
* fragmented fid.
*/
+continue_lookup:
if (fid_fragment) {
FREE(fid, M_UDFFID);
fid_fragment = 0;
OpenPOWER on IntegriCloud