Commit dede3671 authored by Ian Kent's avatar Ian Kent Committed by Christian Brauner

autofs: fix protocol sub version setting

There were a number of updates to protocol version 4, take account of
that when setting the super block info sub version field.
Signed-off-by: default avatarIan Kent <raven@themaw.net>
Reviewed-by: default avatarBill O'Donnell <bodonnel@redhat.com>
Message-Id: <20230922041215.13675-9-raven@themaw.net>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent e6ec453b
......@@ -287,7 +287,17 @@ static int autofs_validate_protocol(struct fs_context *fc)
sbi->version = AUTOFS_MAX_PROTO_VERSION;
else
sbi->version = sbi->max_proto;
sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
switch (sbi->version) {
case 4:
sbi->sub_version = 7;
break;
case 5:
sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
break;
default:
sbi->sub_version = 0;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment