From: Christoph Hellwig Date: Wed, 28 Feb 2018 10:10:01 -0800 Subject: [Cluster-devel] [PATCH] gfs2: Update setattr permission checks In-Reply-To: <20180227173120.17390-1-agruenba@redhat.com> References: <20180227173120.17390-1-agruenba@redhat.com> Message-ID: <20180228181001.GB23511@infradead.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.