Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f2d0d85e58099d518cb50b1c95fc1fc62bbce1b8
Commit:     f2d0d85e58099d518cb50b1c95fc1fc62bbce1b8
Parent:     2efef837fb84f78cee7439804cb3722bffc64e75
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 2 14:46:09 2007 -0800
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Sat Feb 3 15:35:03 2007 -0800

    NFSv4: Fix Oops in nfs4_create_referral_server
    
    The filehandle that is passed into nfs4_create_referral_server is
    not initialised. The expectation is that nfs4_create_referral_server will
    initialise it, and return it to the caller.
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/client.c |    9 +++++++--
 fs/nfs/super.c  |    2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 23ab145..a3191f0 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1030,7 +1030,7 @@ error:
  * Create an NFS4 referral server record
  */
 struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
-                                              struct nfs_fh *fh)
+                                              struct nfs_fh *mntfh)
 {
        struct nfs_client *parent_client;
        struct nfs_server *server, *parent_server;
@@ -1069,8 +1069,13 @@ struct nfs_server *nfs4_create_referral_server(struct 
nfs_clone_mount *data,
        BUG_ON(!server->nfs_client->rpc_ops);
        BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
 
+       /* Probe the root fh to retrieve its FSID and filehandle */
+       error = nfs4_path_walk(server, mntfh, data->mnt_path);
+       if (error < 0)
+               goto error;
+
        /* probe the filesystem info for this server filesystem */
-       error = nfs_probe_fsinfo(server, fh, &fattr);
+       error = nfs_probe_fsinfo(server, mntfh, &fattr);
        if (error < 0)
                goto error;
 
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 28108c8..89da0a3 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1044,7 +1044,7 @@ static int nfs4_referral_get_sb(struct file_system_type 
*fs_type, int flags,
                nfs4_fill_super(s);
        }
 
-       mntroot = nfs4_get_root(s, data->fh);
+       mntroot = nfs4_get_root(s, &mntfh);
        if (IS_ERR(mntroot)) {
                error = PTR_ERR(mntroot);
                goto error_splat_super;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to