From nobody@FreeBSD.org  Thu Apr 28 16:02:24 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 69A511065673
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Apr 2011 16:02:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5961D8FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Apr 2011 16:02:24 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3SG2NSH019005
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Apr 2011 16:02:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p3SG2NFD019004;
	Thu, 28 Apr 2011 16:02:23 GMT
	(envelope-from nobody)
Message-Id: <201104281602.p3SG2NFD019004@red.freebsd.org>
Date: Thu, 28 Apr 2011 16:02:23 GMT
From: "Oleg A. Mamontov" <oleg@mamontov.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /usr/bin/find ignores whiteouts even with '-type w'
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156703
>Category:       bin
>Synopsis:       [patch] find(1) ignores whiteouts even with '-type w'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 28 16:10:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon May 02 00:03:44 UTC 2011
>Originator:     Oleg A. Mamontov
>Release:        8-STABLE
>Organization:
Rambler Internet Holding
>Environment:
FreeBSD db02.avia.rambler.ru 8.2-20110302-SNAP FreeBSD 8.2-20110302-SNAP #0: Wed Mar  2 06:41:55 UTC 2011     root@nat-sl.rambler.ru:/usr/obj/usr/src/sys/DEVEL  amd64
>Description:
`/usr/bin/find -type w` doesn't find whiteouts on upper layer of unionfs.
>How-To-Repeat:

>Fix:
--- usr.bin/find/find.c.orig	2011-04-28 19:57:56.000000000 +0400
+++ usr.bin/find/find.c	2011-04-28 19:58:35.000000000 +0400
@@ -210,6 +210,8 @@
 			continue;
 #ifdef FTS_W
 		case FTS_W:
+			if (ftsoptions & FTS_WHITEOUT)
+				break;
 			continue;
 #endif /* FTS_W */
 		}


>Release-Note:
>Audit-Trail:
>Unformatted:
