Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / fs / nfs / super.c
index e8d40030cab4939264b4e2d2350cea9ae6c60546..baa28860ad274cd95517e911cd0d1c51da2262ce 100644 (file)
@@ -20,7 +20,6 @@
  *   of another (see nfs_lookup())
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -45,6 +44,7 @@
 #include <linux/vfs.h>
 #include <linux/inet.h>
 #include <linux/nfs_xdr.h>
+#include <linux/magic.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -82,7 +82,7 @@ struct file_system_type nfs_xdev_fs_type = {
        .fs_flags       = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
 };
 
-static struct super_operations nfs_sops = {
+static const struct super_operations nfs_sops = {
        .alloc_inode    = nfs_alloc_inode,
        .destroy_inode  = nfs_destroy_inode,
        .write_inode    = nfs_write_inode,
@@ -126,7 +126,7 @@ struct file_system_type nfs4_referral_fs_type = {
        .fs_flags       = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
 };
 
-static struct super_operations nfs4_sops = {
+static const struct super_operations nfs4_sops = {
        .alloc_inode    = nfs_alloc_inode,
        .destroy_inode  = nfs_destroy_inode,
        .write_inode    = nfs_write_inode,
@@ -835,7 +835,7 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
        }
        /* RFC3530: The default port for NFS is 2049 */
        if (addr.sin_port == 0)
-               addr.sin_port = NFS_PORT;
+               addr.sin_port = htons(NFS_PORT);
 
        /* Grab the authentication type */
        authflavour = RPC_AUTH_UNIX;