diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 16:54:00 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-04 22:19:13 -0400 |
commit | ce3e9a8a10086b28444cab1431dfc926787ecfcb (patch) | |
tree | 8242cc428def988b47ecc7a5c0283e37d3238110 /fs/bcachefs/fs.c | |
parent | 4bd156c4b44ef34bd57d20a0a48aad829e1c54c1 (diff) |
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 3 |
1 files changed, 0 insertions, 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)); } |