Skip to content

Commit dede367

Browse files
raven-aubrauner
authored andcommitted
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: Ian Kent <raven@themaw.net> Reviewed-by: Bill O'Donnell <bodonnel@redhat.com> Message-Id: <20230922041215.13675-9-raven@themaw.net> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent e6ec453 commit dede367

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

fs/autofs/inode.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,17 @@ static int autofs_validate_protocol(struct fs_context *fc)
287287
sbi->version = AUTOFS_MAX_PROTO_VERSION;
288288
else
289289
sbi->version = sbi->max_proto;
290-
sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
290+
291+
switch (sbi->version) {
292+
case 4:
293+
sbi->sub_version = 7;
294+
break;
295+
case 5:
296+
sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
297+
break;
298+
default:
299+
sbi->sub_version = 0;
300+
}
291301

292302
return 0;
293303
}

0 commit comments

Comments
 (0)