OSDN Git Service

NFS: Convert mount option parsing to use functionality from fs_parser.h
authorScott Mayhew <smayhew@redhat.com>
Tue, 10 Dec 2019 12:31:12 +0000 (07:31 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:15:17 +0000 (10:15 -0500)
commite38bb238ed8ce280a217629294ba51dc217c5a2c
tree3460d0b129c76be0454b20d159f5b086405302aa
parent38465f5d1af932494d66b52d26bb3a02b837cdf8
NFS: Convert mount option parsing to use functionality from fs_parser.h

Split out from commit "NFS: Add fs_context support."

Convert existing mount option definitions to fs_parameter_enum's and
fs_parameter_spec's.  Parse mount options using fs_parse() and
lookup_constant().

Notes:

1) Fixed a typo in the udp6 definition in nfs_xprt_protocol_tokens
from the original commit.

2) fs_parse() expects an fs_context as the first arg so that any
errors can be logged to the fs_context.  We're passing NULL for the
fs_context (this will change in commit "NFS: Add fs_context support.")
which is okay as it will cause logfc() to do a printk() instead.

3) fs_parse() expects an fs_paramter as the third arg.  We're
building an fs_parameter manually in nfs_fs_context_parse_option(),
which will go away in commit "NFS: Add fs_context support.".

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/fs_context.c