* [PATCH] xfs: fix the dax supported check in xfs_ioctl_setattr_dax_invalidate
@ 2019-08-30 10:23 Christoph Hellwig
2019-09-06 1:03 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2019-08-30 10:23 UTC (permalink / raw)
To: linux-xfs
Setting the DAX flag on the directory of a file system that is not on a
DAX capable device makes as little sense as setting it on a regular file
on the same file system.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_ioctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 9ea51664932e..d1d0929aa462 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1309,8 +1309,7 @@ xfs_ioctl_setattr_dax_invalidate(
if (fa->fsx_xflags & FS_XFLAG_DAX) {
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
return -EINVAL;
- if (S_ISREG(inode->i_mode) &&
- !bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
+ if (!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
sb->s_blocksize))
return -EINVAL;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs: fix the dax supported check in xfs_ioctl_setattr_dax_invalidate
2019-08-30 10:23 [PATCH] xfs: fix the dax supported check in xfs_ioctl_setattr_dax_invalidate Christoph Hellwig
@ 2019-09-06 1:03 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2019-09-06 1:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs
On Fri, Aug 30, 2019 at 12:23:15PM +0200, Christoph Hellwig wrote:
> Setting the DAX flag on the directory of a file system that is not on a
> DAX capable device makes as little sense as setting it on a regular file
> on the same file system.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Weirdly, I never explicitly acknoweledged this...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_ioctl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 9ea51664932e..d1d0929aa462 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1309,8 +1309,7 @@ xfs_ioctl_setattr_dax_invalidate(
> if (fa->fsx_xflags & FS_XFLAG_DAX) {
> if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
> return -EINVAL;
> - if (S_ISREG(inode->i_mode) &&
> - !bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
> + if (!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
> sb->s_blocksize))
> return -EINVAL;
> }
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-06 1:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 10:23 [PATCH] xfs: fix the dax supported check in xfs_ioctl_setattr_dax_invalidate Christoph Hellwig
2019-09-06 1:03 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).