From: Al Viro Date: Fri, 4 Mar 2011 06:31:03 +0000 (-0500) Subject: omfs: merge unlink() and rmdir(), close leak in rename() X-Git-Tag: v2.6.39-rc1~420^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d932805b3dc8c6d80d8948f7d7d0d8336d53b2ed;p=pandora-kernel.git omfs: merge unlink() and rmdir(), close leak in rename() In case of directory-overwriting rename(), omfs forgot to mark the victim doomed, so omfs_evict_inode() didn't free it. We could fix that by calling omfs_rmdir() for directory victims instead of doing omfs_unlink(), but it's easier to merge omfs_unlink() and omfs_rmdir() instead. Note that we have no hardlinks here. It also makes the checks in omfs_rename() go away - they fold into what omfs_remove() does when it runs into a directory. Signed-off-by: Al Viro Signed-off-by: Bob Copeland --- Reading git-diff-tree failed