Skip to content

Commit

Permalink
btrfs: remove redundant null check in btrfs_dentry_release()
Browse files Browse the repository at this point in the history
It doesn't need to check NULL for kfree()

Signed-off-by: Daeseok Youn <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
daeseokyoun authored and masoncl committed Jun 10, 2014
1 parent ef3b9af commit 944a451
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5168,8 +5168,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,
Expand Down

0 comments on commit 944a451

Please sign in to comment.