From ce3e9a8a10086b28444cab1431dfc926787ecfcb Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 2 Nov 2023 16:54:00 -0400 Subject: [PATCH] bcachefs: .get_parent() should return an error pointer Delete the useless check for inum == 0; we'll return -ENOENT without it, which is what we want. Signed-off-by: Kent Overstreet --- fs/bcachefs/fs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 6642b88c41a0..a425c7783cda 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1213,9 +1213,6 @@ static struct dentry *bch2_get_parent(struct dentry *child) .inum = inode->ei_inode.bi_dir, }; - if (!parent_inum.inum) - return NULL; - return d_obtain_alias(bch2_vfs_inode_get(c, parent_inum)); }