All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allison Collins <allison.henderson@oracle.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] xfs: clean up xfs_merge_ioc_xflags
Date: Sun, 7 Jul 2019 15:29:48 -0700	[thread overview]
Message-ID: <187b53a1-ac13-f900-fb28-22a8e6cc75dc@oracle.com> (raw)
In-Reply-To: <156174693930.1557952.9566025019367233702.stgit@magnolia>

On 6/28/19 11:35 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Clean up the calling convention since we're editing the fsxattr struct
> anyway.
> 
This one looks ok.  You can add my review:
Reviewed-by: Allison Collins <allison.henderson@oracle.com>

> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>   fs/xfs/xfs_ioctl.c |   32 ++++++++++++++------------------
>   1 file changed, 14 insertions(+), 18 deletions(-)
> 
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 6f55cd7eb34f..d2526d9070d2 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -829,35 +829,31 @@ xfs_ioc_ag_geometry(
>    * Linux extended inode flags interface.
>    */
>   
> -STATIC unsigned int
> +static inline void
>   xfs_merge_ioc_xflags(
> -	unsigned int	flags,
> -	unsigned int	start)
> +	struct fsxattr	*fa,
> +	unsigned int	flags)
>   {
> -	unsigned int	xflags = start;
> -
>   	if (flags & FS_IMMUTABLE_FL)
> -		xflags |= FS_XFLAG_IMMUTABLE;
> +		fa->fsx_xflags |= FS_XFLAG_IMMUTABLE;
>   	else
> -		xflags &= ~FS_XFLAG_IMMUTABLE;
> +		fa->fsx_xflags &= ~FS_XFLAG_IMMUTABLE;
>   	if (flags & FS_APPEND_FL)
> -		xflags |= FS_XFLAG_APPEND;
> +		fa->fsx_xflags |= FS_XFLAG_APPEND;
>   	else
> -		xflags &= ~FS_XFLAG_APPEND;
> +		fa->fsx_xflags &= ~FS_XFLAG_APPEND;
>   	if (flags & FS_SYNC_FL)
> -		xflags |= FS_XFLAG_SYNC;
> +		fa->fsx_xflags |= FS_XFLAG_SYNC;
>   	else
> -		xflags &= ~FS_XFLAG_SYNC;
> +		fa->fsx_xflags &= ~FS_XFLAG_SYNC;
>   	if (flags & FS_NOATIME_FL)
> -		xflags |= FS_XFLAG_NOATIME;
> +		fa->fsx_xflags |= FS_XFLAG_NOATIME;
>   	else
> -		xflags &= ~FS_XFLAG_NOATIME;
> +		fa->fsx_xflags &= ~FS_XFLAG_NOATIME;
>   	if (flags & FS_NODUMP_FL)
> -		xflags |= FS_XFLAG_NODUMP;
> +		fa->fsx_xflags |= FS_XFLAG_NODUMP;
>   	else
> -		xflags &= ~FS_XFLAG_NODUMP;
> -
> -	return xflags;
> +		fa->fsx_xflags &= ~FS_XFLAG_NODUMP;
>   }
>   
>   STATIC unsigned int
> @@ -1503,7 +1499,7 @@ xfs_ioc_setxflags(
>   		return -EOPNOTSUPP;
>   
>   	xfs_fill_fsxattr(ip, false, &fa);
> -	fa.fsx_xflags = xfs_merge_ioc_xflags(flags, fa.fsx_xflags);
> +	xfs_merge_ioc_xflags(&fa, flags);
>   
>   	error = mnt_want_write_file(filp);
>   	if (error)
> 

  reply	other threads:[~2019-07-07 22:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 18:35 [PATCH v2 0/3] xfs: further FSSETXATTR cleanups Darrick J. Wong
2019-06-28 18:35 ` [PATCH 1/3] xfs: refactor setflags to use setattr code directly Darrick J. Wong
2019-07-07 22:29   ` Allison Collins
2019-07-08 16:41     ` Darrick J. Wong
2019-06-28 18:35 ` [PATCH 2/3] xfs: clean up xfs_merge_ioc_xflags Darrick J. Wong
2019-07-07 22:29   ` Allison Collins [this message]
2019-06-28 18:35 ` [PATCH 3/3] xfs: make the dax inode flag advisory Darrick J. Wong
2019-07-07 22:30   ` Allison Collins
  -- strict thread matches above, loose matches on Subject: below --
2019-06-26  2:33 [PATCH 0/3] xfs: further FSSETXATTR cleanups Darrick J. Wong
2019-06-26  2:33 ` [PATCH 2/3] xfs: clean up xfs_merge_ioc_xflags Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=187b53a1-ac13-f900-fb28-22a8e6cc75dc@oracle.com \
    --to=allison.henderson@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.