1
0

vfs: remove dget() from dentry_unhash()

This serves no useful purpose that I can discern.  All callers (rename,
rmdir) hold their own reference to the dentry.

A quick audit of all file systems showed no relevant checks on the value
of d_count in vfs_rmdir/vfs_rename_dir paths.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Este cometimento está contido em:
Sage Weil
2011-05-24 13:06:05 -07:00
cometido por Al Viro
ascendente 48293699a0
cometimento 64252c75a2
3 ficheiros modificados com 1 adições e 8 eliminações

Ver ficheiro

@@ -105,7 +105,6 @@ static int xattr_rmdir(struct inode *dir, struct dentry *dentry)
mutex_unlock(&dentry->d_inode->i_mutex);
if (!error)
d_delete(dentry);
dput(dentry);
return error;
}