xfs: check for invalid inode reflink flags
We don't support sharing blocks on the realtime device. Flag inodes with the reflink or cowextsize flags set when the reflink feature is disabled. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -1034,6 +1034,10 @@ xfs_ioctl_setattr_xflags(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Don't allow us to set realtime mode for a reflinked file. */
|
||||
if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Can't modify an immutable/append-only file unless
|
||||
* we have appropriate permission.
|
||||
|
Reference in New Issue
Block a user