From: Dave Chinner Subject: Re: [PATCH v10 23/46] xfs: Make xfs_set_mode non-static Date: Mon, 12 Oct 2015 10:37:40 +1100 Message-ID: <20151011233740.GZ27164@dastard> References: <1444604337-17651-1-git-send-email-andreas.gruenbacher@gmail.com> <1444604337-17651-24-git-send-email-andreas.gruenbacher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, Theodore Ts'o , Andreas Gruenbacher , linux-api@vger.kernel.org, Trond Myklebust , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, "J. Bruce Fields" , Andreas Dilger , Alexander Viro , linux-fsdevel@vger.kernel.org, Jeff Layton , linux-ext4@vger.kernel.org, Anna Schumaker To: Andreas Gruenbacher Return-path: Content-Disposition: inline In-Reply-To: <1444604337-17651-24-git-send-email-andreas.gruenbacher@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com List-Id: linux-ext4.vger.kernel.org On Mon, Oct 12, 2015 at 12:58:34AM +0200, Andreas Gruenbacher wrote: > From: Andreas Gruenbacher > > Make xfs_set_mode non-static and move it from xfs_acl.c into xfs_inode.c. > > Signed-off-by: Andreas Gruenbacher ..... > +++ b/fs/xfs/xfs_inode.c > @@ -3587,3 +3587,21 @@ xfs_iflush_int( > corrupt_out: > return -EFSCORRUPTED; > } > + > +int > +xfs_set_mode(struct inode *inode, umode_t mode) > +{ > + int error = 0; > + > + if (mode != inode->i_mode) { > + struct iattr iattr; > + > + iattr.ia_valid = ATTR_MODE | ATTR_CTIME; > + iattr.ia_mode = mode; > + iattr.ia_ctime = current_fs_time(inode->i_sb); > + > + error = xfs_setattr_nonsize(XFS_I(inode), &iattr, XFS_ATTR_NOACL); > + } > + > + return error; > +} Now needs a comment to explain that this function has a special "called only from ACL modification" context associated with it. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs