diff options
author | Steve Dickson <steved@redhat.com> | 2004-08-01 20:15:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-01 20:15:19 -0700 |
commit | 8b0cf2f6c2b306f5bef55315fe5818ad4796bad0 (patch) | |
tree | 17c549775a5dbc99d65dc2051fb0df1d35c4d6fc /fs | |
parent | db386bbe60bb3e36e1ffa9e805302c1c5436d5ee (diff) | |
download | history-8b0cf2f6c2b306f5bef55315fe5818ad4796bad0.tar.gz |
[PATCH] nsf4 oops fixes
Here are some oops I found in error paths in the mounting pathes while
debugging something else... I sent it out a while ago, but it didn't seem
to get any traction....
The nfs_fill_super() fix is obvious and in nfs4_fill_super(), the
server->client ptr needs to be set before the cl_idmap check, since
rpc_shutdown_client() needs it when the check fails.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/inode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index d3cf187b95ba01..36f5abc65dcba5 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -456,7 +456,7 @@ nfs_fill_super(struct super_block *sb, struct nfs_mount_data *data, int silent) /* Create RPC client handles */ server->client = nfs_create_client(server, data); - if (server->client == NULL) + if (IS_ERR(server->client)) goto out_fail; /* RFC 2623, sec 2.3.2 */ if (authflavor != RPC_AUTH_UNIX) { @@ -1550,16 +1550,17 @@ static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data, err = PTR_ERR(clnt); goto out_remove_list; } + + clnt->cl_intr = (server->flags & NFS4_MOUNT_INTR) ? 1 : 0; + clnt->cl_softrtry = (server->flags & NFS4_MOUNT_SOFT) ? 1 : 0; + server->client = clnt; + err = -ENOMEM; if (server->nfs4_state->cl_idmap == NULL) { printk(KERN_WARNING "NFS: failed to create idmapper.\n"); goto out_shutdown; } - clnt->cl_intr = (server->flags & NFS4_MOUNT_INTR) ? 1 : 0; - clnt->cl_softrtry = (server->flags & NFS4_MOUNT_SOFT) ? 1 : 0; - server->client = clnt; - if (clnt->cl_auth->au_flavor != authflavour) { if (rpcauth_create(authflavour, clnt) == NULL) { printk(KERN_WARNING "NFS: couldn't create credcache!\n"); |