bcachefs: mount: fix null deref with null devname
authorDan Robertson <dan@dlrobertson.com>
Thu, 10 Jun 2021 11:52:42 +0000 (07:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:06 +0000 (17:09 -0400)
commit044c8c9e05bc87cdc610eb320e8fdc694f3866df
treecc4e38cd36d9b8cef02a63f7355308aee4f600b1
parenta49e9a0589d1828af787bacf0a1e18eca7facb88
bcachefs: mount: fix null deref with null devname

 - Fix null deref on mount when given a null device name.
 - Move the dev_name checks to return EINVAL when it is invalid.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c