summaryrefslogtreecommitdiff
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-12-10 15:31:10 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 18:15:17 +0300
commite558100fda7e8c7888f523920214bcb35ed9382b (patch)
tree062da61c7b41132239f3a31c0523c7ed83be460b /fs/nfs/internal.h
parent48be8a66cf98accca033c42d214698dd64ac4f79 (diff)
downloadlinux-e558100fda7e8c7888f523920214bcb35ed9382b.tar.xz
NFS: Do some tidying of the parsing code
Do some tidying of the parsing code, including: (*) Returning 0/error rather than true/false. (*) Putting the nfs_fs_context pointer first in some arg lists. (*) Unwrap some lines that will now fit on one line. (*) Provide unioned sockaddr/sockaddr_storage fields to avoid casts. (*) nfs_parse_devname() can paste its return values directly into the nfs_fs_context struct as that's where the caller puts them. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 5342f3e4d565..003c2b8eb1e6 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -82,11 +82,11 @@ struct nfs_client_initdata {
* In-kernel mount arguments
*/
struct nfs_fs_context {
- int flags;
+ unsigned int flags; /* NFS{,4}_MOUNT_* flags */
unsigned int rsize, wsize;
unsigned int timeo, retrans;
- unsigned int acregmin, acregmax,
- acdirmin, acdirmax;
+ unsigned int acregmin, acregmax;
+ unsigned int acdirmin, acdirmax;
unsigned int namlen;
unsigned int options;
unsigned int bsize;
@@ -102,7 +102,10 @@ struct nfs_fs_context {
bool sloppy;
struct {
- struct sockaddr_storage address;
+ union {
+ struct sockaddr address;
+ struct sockaddr_storage _address;
+ };
size_t addrlen;
char *hostname;
u32 version;
@@ -111,7 +114,10 @@ struct nfs_fs_context {
} mount_server;
struct {
- struct sockaddr_storage address;
+ union {
+ struct sockaddr address;
+ struct sockaddr_storage _address;
+ };
size_t addrlen;
char *hostname;
char *export_path;