Skip to contentSkip to conversation

btrfs: remove redundant null check in btrfs_dentry_release()

PATCH New Daeseok Youn 1 participant 1 message Apr 14, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: remove redundant null check in btrfs_dentry_release()

It doesn't need to check NULL for kfree()

---
 fs/btrfs/inode.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
fs/btrfs/inode.c +1 -2
index 06e9a41..d9f54b0 100644
@@ -5141,8 +5141,7 @@ static int btrfs_dentry_delete(const struct dentry *dentry)
 
 static void btrfs_dentry_release(struct dentry *dentry)
 {
-	if (dentry->d_fsdata)
-		kfree(dentry->d_fsdata);
+	kfree(dentry->d_fsdata);
 }
 
 static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
Signature · 1 line
1.7.4.4