Skip to content

Commit ce3e9a8

Browse files
author
Kent Overstreet
committed
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>
1 parent 4bd156c commit ce3e9a8

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

fs/bcachefs/fs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,9 +1213,6 @@ static struct dentry *bch2_get_parent(struct dentry *child)
12131213
.inum = inode->ei_inode.bi_dir,
12141214
};
12151215

1216-
if (!parent_inum.inum)
1217-
return NULL;
1218-
12191216
return d_obtain_alias(bch2_vfs_inode_get(c, parent_inum));
12201217
}
12211218

0 commit comments

Comments
 (0)