git: kernel - Fix various memory & swap leaks in tmpfs

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Sep 14 23:29:52 PDT 2011


commit a1fa5d8d095e6aa52c4a9ac5d2ab52b03fee54b9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Sep 14 23:25:03 2011 -0700

    kernel - Fix various memory & swap leaks in tmpfs
    
    * tmpfs was using a vref() instead of a vget() (cache_vget() to be precise)
      which does not necessarily reactivate an inactive vnode.  This can cause
      the vnode to languish in the vnode cache even when the underlying file
      has been removed and no longer has any open() descriptors.
    
    * tmpfs_nrmdir(), tmpfs_nremove(), and tmpfs_nrename() (for target replacement
      renames) was effected.
    
    Reported-by: sephe and others, tested by sephe, dillon

Summary of changes:
 sys/vfs/tmpfs/tmpfs_vnops.c |   59 +++++++++++++++++++++++++++++-------------
 1 files changed, 41 insertions(+), 18 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a1fa5d8d095e6aa52c4a9ac5d2ab52b03fee54b9


-- 
DragonFly BSD source repository





More information about the Commits mailing list