diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 97cfb143e09..665949d2779 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -883,13 +883,15 @@ static int nfs4_get_sb(struct file_system_type *fs_type, | |||
883 | goto out_free; | 883 | goto out_free; |
884 | } | 884 | } |
885 | 885 | ||
886 | if (s->s_fs_info != server) { | ||
887 | nfs_free_server(server); | ||
888 | server = NULL; | ||
889 | } | ||
890 | |||
886 | if (!s->s_root) { | 891 | if (!s->s_root) { |
887 | /* initial superblock/root creation */ | 892 | /* initial superblock/root creation */ |
888 | s->s_flags = flags; | 893 | s->s_flags = flags; |
889 | |||
890 | nfs4_fill_super(s); | 894 | nfs4_fill_super(s); |
891 | } else { | ||
892 | nfs_free_server(server); | ||
893 | } | 895 | } |
894 | 896 | ||
895 | mntroot = nfs4_get_root(s, &mntfh); | 897 | mntroot = nfs4_get_root(s, &mntfh); |