From owner-svn-src-all@FreeBSD.ORG Thu May 2 18:46:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BA5C01F6; Thu, 2 May 2013 18:46:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AD4A6101B; Thu, 2 May 2013 18:46:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r42IkVh3072863; Thu, 2 May 2013 18:46:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r42IkVaO072862; Thu, 2 May 2013 18:46:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201305021846.r42IkVaO072862@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 2 May 2013 18:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250190 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2013 18:46:31 -0000 Author: kib Date: Thu May 2 18:46:31 2013 New Revision: 250190 URL: http://svnweb.freebsd.org/changeset/base/250190 Log: Fix the v_object leak for non-regular tmpfs vnodes. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 2 18:44:31 2013 (r250189) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 2 18:46:31 2013 (r250190) @@ -264,6 +264,7 @@ tmpfs_open(struct vop_open_args *v) error = EPERM; else { error = 0; + /* For regular files, the call below is nop. */ vnode_create_vobject(vp, node->tn_size, v->a_td); } @@ -1474,6 +1475,8 @@ tmpfs_reclaim(struct vop_reclaim_args *v if (vp->v_type == VREG) tmpfs_destroy_vobject(vp, node->tn_reg.tn_aobj); + else + vnode_destroy_vobject(vp); vp->v_object = NULL; cache_purge(vp);