From 7a81b01d581e0105e98118a656cde0355f5d1aad Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Thu, 19 Jul 2007 01:48:21 -0700 Subject: [PATCH] --- yaml --- r: 61589 b: refs/heads/master c: 16b6287a5286e872abece4f42a6eb5899157a836 h: refs/heads/master i: 61587: 6c94a31f1a0bef6a80e1180a5f01c7fea1c0e9ea v: v3 --- [refs] | 2 +- trunk/fs/nfsctl.c | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index a2b047413ac6..65d6a0f1dbfd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4ac4efc1f5575a268417f80ef4059aee383f8331 +refs/heads/master: 16b6287a5286e872abece4f42a6eb5899157a836 diff --git a/trunk/fs/nfsctl.c b/trunk/fs/nfsctl.c index c043136a82ca..51f1b31acbf6 100644 --- a/trunk/fs/nfsctl.c +++ b/trunk/fs/nfsctl.c @@ -23,19 +23,15 @@ static struct file *do_open(char *name, int flags) { struct nameidata nd; + struct vfsmount *mnt; int error; - nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); + mnt = do_kern_mount("nfsd", 0, "nfsd", NULL); + if (IS_ERR(mnt)) + return (struct file *)mnt; - if (IS_ERR(nd.mnt)) - return (struct file *)nd.mnt; - - nd.dentry = dget(nd.mnt->mnt_root); - nd.last_type = LAST_ROOT; - nd.flags = 0; - nd.depth = 0; - - error = path_walk(name, &nd); + error = vfs_path_lookup(mnt->mnt_root, mnt, name, 0, &nd); + mntput(mnt); /* drop do_kern_mount reference */ if (error) return ERR_PTR(error);