Commit 9954bf92 authored by David Howells's avatar David Howells Committed by Anna Schumaker
Browse files

NFS: Move mount parameterisation bits into their own file



Split various bits relating to mount parameterisation out from
fs/nfs/super.c into their own file to form the basis of filesystem context
handling for NFS.

No other changes are made to the code beyond removing 'static' qualifiers.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent adf2314f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ CFLAGS_nfstrace.o += -I$(src)
nfs-y 			:= client.o dir.o file.o getroot.o inode.o super.o \
			   io.o direct.o pagelist.o read.o symlink.o unlink.o \
			   write.o namespace.o mount_clnt.o nfstrace.o \
			   export.o sysfs.o
			   export.o sysfs.o fs_context.o
nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o
nfs-$(CONFIG_SYSCTL)	+= sysctl.o
nfs-$(CONFIG_NFS_FSCACHE) += fscache.o fscache-index.o

fs/nfs/fs_context.c

0 → 100644
+1414 −0

File added.

Preview size limit exceeded, changes collapsed.

+30 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#include <linux/mount.h>
#include <linux/security.h>
#include <linux/crc32.h>
#include <linux/sunrpc/addr.h>
#include <linux/nfs_page.h>
#include <linux/wait_bit.h>

@@ -224,6 +225,22 @@ extern const struct svc_version nfs4_callback_version1;
extern const struct svc_version nfs4_callback_version4;

struct nfs_pageio_descriptor;

/* mount.c */
#define NFS_TEXT_DATA		1

extern struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void);
extern void nfs_free_parsed_mount_data(struct nfs_parsed_mount_data *data);
extern int nfs_parse_mount_options(char *raw, struct nfs_parsed_mount_data *mnt);
extern int nfs_validate_mount_data(struct file_system_type *fs_type,
				   void *options,
				   struct nfs_parsed_mount_data *args,
				   struct nfs_fh *mntfh,
				   const char *dev_name);
extern int nfs_validate_text_mount_data(void *options,
					struct nfs_parsed_mount_data *args,
					const char *dev_name);

/* pagelist.c */
extern int __init nfs_init_nfspagecache(void);
extern void nfs_destroy_nfspagecache(void);
@@ -765,3 +782,16 @@ static inline bool nfs_error_is_fatal_on_server(int err)
	}
	return nfs_error_is_fatal(err);
}

/*
 * Select between a default port value and a user-specified port value.
 * If a zero value is set, then autobind will be used.
 */
static inline void nfs_set_port(struct sockaddr *sap, int *port,
				const unsigned short default_port)
{
	if (*port == NFS_UNSPEC_PORT)
		*port = default_port;

	rpc_set_port(sap, *port);
}
+0 −1411

File changed.

Preview size limit exceeded, changes collapsed.