Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 873ae4d5 authored by Sage Weil's avatar Sage Weil Committed by Al Viro
Browse files

sysv: remove unnecessary dentry_unhash from rmdir, dir rename



sysv does not have problems with references to unlinked directories.

CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 76f0b8d2
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -196,8 +196,6 @@ static int sysv_rmdir(struct inode * dir, struct dentry * dentry)
	struct inode *inode = dentry->d_inode;
	int err = -ENOTEMPTY;

	dentry_unhash(dentry);

	if (sysv_empty_dir(inode)) {
		err = sysv_unlink(dir, dentry);
		if (!err) {
@@ -224,9 +222,6 @@ static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
	struct sysv_dir_entry * old_de;
	int err = -ENOENT;

	if (new_inode && S_ISDIR(new_inode->i_mode))
		dentry_unhash(new_dentry);

	old_de = sysv_find_entry(old_dentry, &old_page);
	if (!old_de)
		goto out;