From owner-svn-src-stable-10@FreeBSD.ORG Wed Oct 22 09:06:37 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 042BDA12; Wed, 22 Oct 2014 09:06:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E490EEB8; Wed, 22 Oct 2014 09:06:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9M96af3034388; Wed, 22 Oct 2014 09:06:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9M96aS7034387; Wed, 22 Oct 2014 09:06:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410220906.s9M96aS7034387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Oct 2014 09:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273461 - stable/10/sys/fs/deadfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 09:06:37 -0000 Author: kib Date: Wed Oct 22 09:06:36 2014 New Revision: 273461 URL: https://svnweb.freebsd.org/changeset/base/273461 Log: MFC r273130: Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller is interested in i/o state. Return POLLNVAL for invalid bits, similar to poll_no_poll(). Modified: stable/10/sys/fs/deadfs/dead_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/deadfs/dead_vnops.c ============================================================================== --- stable/10/sys/fs/deadfs/dead_vnops.c Wed Oct 22 09:04:56 2014 (r273460) +++ stable/10/sys/fs/deadfs/dead_vnops.c Wed Oct 22 09:06:36 2014 (r273461) @@ -163,16 +163,19 @@ dead_write(ap) return (EIO); } -/* - * Trivial poll routine that always returns POLLHUP. - * This is necessary so that a process which is polling a file - * gets notified when that file is revoke()d. - */ static int dead_poll(ap) struct vop_poll_args *ap; { - return (POLLHUP); + + if (ap->a_events & ~POLLSTANDARD) + return (POLLNVAL); + + /* + * Let the user find out that the descriptor is gone. + */ + return (POLLHUP | ((POLLIN | POLLRDNORM) & ap->a_events)); + } static int