diff options
Diffstat (limited to 'fs/autofs/inode.c')
-rw-r--r-- | fs/autofs/inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 0477bce7d277..6d2e01c9057d 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -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; } |