lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 7 May 2007 11:59:52 +1000
From:	Neil Brown <neilb@...e.de>
To:	"Josef 'Jeff' Sipek" <jsipek@...sunysb.edu>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, akpm@...ux-foundation.org,
	viro@....linux.org.uk, Trond.Myklebust@...app.com,
	mhalcrow@...ibm.com
Subject: Re: [PATCH 1/1] nfsctl: Use vfs_path_lookup

On Sunday May 6, jsipek@...sunysb.edu wrote:
> use vfs_path_lookup instead of open-coding the necessary functionality.
> 
> Signed-off-by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>

Acked-by: NeilBrown <neilb@...e.de>

Thanks,
NeilBrown

> ---
>  fs/nfsctl.c |   16 ++++++----------
>  1 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/nfsctl.c b/fs/nfsctl.c
> index c043136..51f1b31 100644
> --- a/fs/nfsctl.c
> +++ b/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);
>  
> -- 
> 1.5.2.rc1.20.g86b9
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ