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]
Message-ID: <20121031211104.GY2945@htj.dyndns.org>
Date:	Wed, 31 Oct 2012 14:11:04 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Aristeu Rozanski <aris@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH v2] fs: xattr: rewrite simple_xattr_set()

Hello, sorry about the delay.

Just one nitpick.

On Thu, Oct 25, 2012 at 02:30:18PM -0400, Aristeu Rozanski wrote:
> +static int __simple_xattr_remove(struct simple_xattrs *xattrs,
> +				 const char *name)
> +{
> +	struct simple_xattr *xattr;
> +
> +	xattr = __find_xattr(xattrs, name);
>  	if (xattr) {
> +		list_del(&xattr->list);
>  		kfree(xattr->name);
>  		kfree(xattr);
> +		return 0;
>  	}
> -	return err;
>  
> +	return -ENODATA;
> +}
> +
> +/*
> + * xattr REMOVE operation for in-memory/pseudo filesystems
> + */
> +int simple_xattr_remove(struct simple_xattrs *xattrs, const char *name)
> +{
> +	int rc;
> +
> +	spin_lock(&xattrs->lock);
> +	rc = __simple_xattr_remove(xattrs, name);
> +	spin_unlock(&xattrs->lock);
> +
> +	return rc;

Do we need these two functions?  Can't you either collapse
__simple_xttar_remove() into simple_xattr_remove() or just call
__simple_xattr_remove() directly from simple_xattr_set() with locking
handled there?  Also, why doesn't simple_xattr_remove() have static?

Thanks.

-- 
tejun
--
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