Skip to content

Commit

Permalink
gfs2_meta: ->mount() can get NULL dev_name
Browse files Browse the repository at this point in the history
get in sync with mount_bdev() handling of the same

Reported-by: [email protected]
Cc: [email protected]
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Oct 13, 2018
1 parent 74dd7c9 commit 3df629d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,9 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
struct path path;
int error;

if (!dev_name || !*dev_name)
return ERR_PTR(-EINVAL);

error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
if (error) {
pr_warn("path_lookup on %s returned error %d\n",
Expand Down

0 comments on commit 3df629d

Please sign in to comment.