aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 0942fcbbad3c..87f65ae07f32 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -60,6 +60,7 @@
60#include "delegation.h" 60#include "delegation.h"
61#include "iostat.h" 61#include "iostat.h"
62#include "internal.h" 62#include "internal.h"
63#include "fscache.h"
63 64
64#define NFSDBG_FACILITY NFSDBG_VFS 65#define NFSDBG_FACILITY NFSDBG_VFS
65 66
@@ -1870,8 +1871,6 @@ static void nfs_clone_super(struct super_block *sb,
1870 nfs_initialise_sb(sb); 1871 nfs_initialise_sb(sb);
1871} 1872}
1872 1873
1873#define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS)
1874
1875static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags) 1874static int nfs_compare_mount_options(const struct super_block *s, const struct nfs_server *b, int flags)
1876{ 1875{
1877 const struct nfs_server *a = s->s_fs_info; 1876 const struct nfs_server *a = s->s_fs_info;
@@ -2036,6 +2035,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
2036 if (!s->s_root) { 2035 if (!s->s_root) {
2037 /* initial superblock/root creation */ 2036 /* initial superblock/root creation */
2038 nfs_fill_super(s, data); 2037 nfs_fill_super(s, data);
2038 nfs_fscache_get_super_cookie(s, data);
2039 } 2039 }
2040 2040
2041 mntroot = nfs_get_root(s, mntfh); 2041 mntroot = nfs_get_root(s, mntfh);
@@ -2056,6 +2056,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
2056out: 2056out:
2057 kfree(data->nfs_server.hostname); 2057 kfree(data->nfs_server.hostname);
2058 kfree(data->mount_server.hostname); 2058 kfree(data->mount_server.hostname);
2059 kfree(data->fscache_uniq);
2059 security_free_mnt_opts(&data->lsm_opts); 2060 security_free_mnt_opts(&data->lsm_opts);
2060out_free_fh: 2061out_free_fh:
2061 kfree(mntfh); 2062 kfree(mntfh);
@@ -2083,6 +2084,7 @@ static void nfs_kill_super(struct super_block *s)
2083 2084
2084 bdi_unregister(&server->backing_dev_info); 2085 bdi_unregister(&server->backing_dev_info);
2085 kill_anon_super(s); 2086 kill_anon_super(s);
2087 nfs_fscache_release_super_cookie(s);
2086 nfs_free_server(server); 2088 nfs_free_server(server);
2087} 2089}
2088 2090
@@ -2390,6 +2392,7 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
2390 if (!s->s_root) { 2392 if (!s->s_root) {
2391 /* initial superblock/root creation */ 2393 /* initial superblock/root creation */
2392 nfs4_fill_super(s); 2394 nfs4_fill_super(s);
2395 nfs_fscache_get_super_cookie(s, data);
2393 } 2396 }
2394 2397
2395 mntroot = nfs4_get_root(s, mntfh); 2398 mntroot = nfs4_get_root(s, mntfh);
@@ -2411,6 +2414,7 @@ out:
2411 kfree(data->client_address); 2414 kfree(data->client_address);
2412 kfree(data->nfs_server.export_path); 2415 kfree(data->nfs_server.export_path);
2413 kfree(data->nfs_server.hostname); 2416 kfree(data->nfs_server.hostname);
2417 kfree(data->fscache_uniq);
2414 security_free_mnt_opts(&data->lsm_opts); 2418 security_free_mnt_opts(&data->lsm_opts);
2415out_free_fh: 2419out_free_fh:
2416 kfree(mntfh); 2420 kfree(mntfh);
@@ -2437,6 +2441,7 @@ static void nfs4_kill_super(struct super_block *sb)
2437 kill_anon_super(sb); 2441 kill_anon_super(sb);
2438 2442
2439 nfs4_renewd_prepare_shutdown(server); 2443 nfs4_renewd_prepare_shutdown(server);
2444 nfs_fscache_release_super_cookie(sb);
2440 nfs_free_server(server); 2445 nfs_free_server(server);
2441} 2446}
2442 2447