Skip to contentSkip to conversation

btrfs: take the last remnants of ->d_fsdata use out

RFC PATCH In review Al Viro 2 participants 2 messages May 13, 2018 – May 14, 2018

Subsystems (2)
lore
Share & tools
lore

Al Viro

author maintainer
#0 lore raw

RFC PATCH 1/1 btrfs: take the last remnants of ->d_fsdata use out

[spotted while going through ->d_fsdata handling around d_splice_alias(); don't really care which tree that goes through]

The only thing even looking at ->d_fsdata in there (since 2012) had been kfree(dentry->d_fsdata) in btrfs_dentry_delete(). Which, incidentally, is all btrfs_dentry_delete() does.

fs/btrfs/inode.c +0 -6
index e064c49c9a9a..c6b2b0a20561 100644
@@ -5842,11 +5842,6 @@ static int btrfs_dentry_delete(const struct dentry *dentry)
 	return 0;
 }
 
-static void btrfs_dentry_release(struct dentry *dentry)
-{
-	kfree(dentry->d_fsdata);
-}
-
 static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
 				   unsigned int flags)
 {
@@ -10665,5 +10660,4 @@ static const struct inode_operations btrfs_symlink_inode_operations = {
 
 const struct dentry_operations btrfs_dentry_operations = {
 	.d_delete	= btrfs_dentry_delete,
-	.d_release	= btrfs_dentry_release,
 };
#1 lore raw
Quoted 6 lines · Al Viro

[spotted while going through ->d_fsdata handling around d_splice_alias(); don't really care which tree that goes through]

The only thing even looking at ->d_fsdata in there (since 2012) had been kfree(dentry->d_fsdata) in btrfs_dentry_delete(). Which, incidentally, is all btrfs_dentry_delete() does.

Right, it's a leftover after the DCACHE_NEED_LOOKUP removal. I'll add it to btrfs tree, thanks.