Scroll to navigation

PART_VALID(9) Block Devices PART_VALID(9)

NAME

part_valid - see if check corresponds to a partition within disk

SYNOPSIS

bool part_valid(struct gendisk * disk, struct hd_struct * check);

ARGUMENTS

disk

gendisk of interest

check

hd_struct pointer to check against the partition table

DESCRIPTION

Check to see if it is safe to dereference check. We don´t always know if req->part is filled in by the block layer. This routine is called to avoid dereferencing a bogus pointer. See req_to_part.

CONTEXT

RCU read locked.

RETURNS

true on success, false on failure

COPYRIGHT

April 2023 Kernel Hackers Manual 2.6.