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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Oct 2015 10:37:40 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Andreas Gruenbacher <andreas.gruenbacher@...il.com>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Theodore Ts'o <tytso@....edu>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Jeff Layton <jlayton@...chiereds.net>,
	Trond Myklebust <trond.myklebust@...marydata.com>,
	Anna Schumaker <anna.schumaker@...app.com>,
	linux-ext4@...r.kernel.org, xfs@....sgi.com,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org,
	linux-api@...r.kernel.org,
	Andreas Gruenbacher <agruenba@...hat.com>
Subject: Re: [PATCH v10 23/46] xfs: Make xfs_set_mode non-static

On Mon, Oct 12, 2015 at 12:58:34AM +0200, Andreas Gruenbacher wrote:
> From: Andreas Gruenbacher <agruenba@...hat.com>
> 
> Make xfs_set_mode non-static and move it from xfs_acl.c into xfs_inode.c.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@...hat.com>
.....
> +++ 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@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ