Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192293
b: refs/heads/master
c: 4f72729
h: refs/heads/master
i:
  192291: 15c158b
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 14, 2010
1 parent 8915e12 commit db7c630
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bac9db9cf85f2518cb523bb1d69c481975c1f9a
refs/heads/master: 4f727296d2428b60138793a0a1207a4085eacf99
16 changes: 12 additions & 4 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2880,17 +2880,21 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type,
struct super_block *s;
struct nfs_server *server;
struct dentry *mntroot;
struct nfs_fh mntfh;
struct nfs_fh *mntfh;
int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
struct nfs_sb_mountdata sb_mntdata = {
.mntflags = flags,
};
int error;
int error = -ENOMEM;

dprintk("--> nfs4_referral_get_sb()\n");

mntfh = nfs_alloc_fhandle();
if (mntfh == NULL)
goto out_err_nofh;

/* create a new volume representation */
server = nfs4_create_referral_server(data, &mntfh);
server = nfs4_create_referral_server(data, mntfh);
if (IS_ERR(server)) {
error = PTR_ERR(server);
goto out_err_noserver;
Expand Down Expand Up @@ -2922,7 +2926,7 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type,
nfs_fscache_get_super_cookie(s, NULL, data);
}

mntroot = nfs4_get_root(s, &mntfh);
mntroot = nfs4_get_root(s, mntfh);
if (IS_ERR(mntroot)) {
error = PTR_ERR(mntroot);
goto error_splat_super;
Expand All @@ -2939,12 +2943,15 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type,

security_sb_clone_mnt_opts(data->sb, s);

nfs_free_fhandle(mntfh);
dprintk("<-- nfs4_referral_get_sb() = 0\n");
return 0;

out_err_nosb:
nfs_free_server(server);
out_err_noserver:
nfs_free_fhandle(mntfh);
out_err_nofh:
dprintk("<-- nfs4_referral_get_sb() = %d [error]\n", error);
return error;

Expand All @@ -2953,6 +2960,7 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type,
bdi_unregister(&server->backing_dev_info);
error_splat_bdi:
deactivate_locked_super(s);
nfs_free_fhandle(mntfh);
dprintk("<-- nfs4_referral_get_sb() = %d [splat]\n", error);
return error;
}
Expand Down

0 comments on commit db7c630

Please sign in to comment.