[Cluster-devel] [PATCH] gfs2: Update setattr permission checks

Christoph Hellwig hch at infradead.org
Wed Feb 28 18:10:01 UTC 2018


On Tue, Feb 27, 2018 at 06:31:20PM +0100, Andreas Gruenbacher wrote:
> Update the permission checks in gfs2_setattr to match those in
> notify_change.  Previously, attempts to set the timestamps of an
> append-only files to the current time were always denied.
> 
> Combines mainline commits beb29e058c35a and f2b20f6ee8423.

Why do you need these duplicate checks?  As far as I can tell
all other file systems rely on notify_change to do this work
for them.

If there is a good reason please factor out the checks and add
EXPORT_SYMBOL_GPL helper for them that is well documented and can be
used by gfs2.

> +	if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) {

Line over 80 characters, please break up.




More information about the Cluster-devel mailing list