omfs: merge unlink() and rmdir(), close leak in rename()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 4 Mar 2011 06:31:03 +0000 (01:31 -0500)
committerBob Copeland <me@bobcopeland.com>
Sat, 5 Mar 2011 21:24:01 +0000 (16:24 -0500)
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 <viro@zeniv.linux.org.uk>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
fs/omfs/dir.c

diff --cc fs/omfs/dir.c
Simple merge