X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fnfsctl.c;h=51f1b31acbf69c7a2aad8877f5b34c9fe19d6ec3;hb=b66545e7ae80b4b0eef3f7884ef9260455070be9;hp=a5a18d4aca40a89661ac5dc219c5041e83ac75bb;hpb=63e8d9114dab88c101be2372cb1f83a4fe74d9c1;p=linux-2.6-omap-h63xx.git diff --git a/fs/nfsctl.c b/fs/nfsctl.c index a5a18d4aca4..51f1b31acbf 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c @@ -4,7 +4,6 @@ * This should eventually move to userland. * */ -#include #include #include #include @@ -24,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);