mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 09:25:22 +02:00
xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery
commit8ef1d96a98
upstream. The XFS_SB_FEAT_INCOMPAT_LOG_XATTRS feature bit protects a filesystem from old kernels that do not know how to recover extended attribute log intent items. Make this check mandatory instead of a debugging assert. Fixes:fd92000878
("xfs: Set up infrastructure for log attribute replay") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c299188b44
commit
c13c21f778
|
@ -510,6 +510,9 @@ xfs_attri_validate(
|
|||
unsigned int op = attrp->alfi_op_flags &
|
||||
XFS_ATTRI_OP_FLAGS_TYPE_MASK;
|
||||
|
||||
if (!xfs_sb_version_haslogxattrs(&mp->m_sb))
|
||||
return false;
|
||||
|
||||
if (attrp->__pad != 0)
|
||||
return false;
|
||||
|
||||
|
@ -602,8 +605,6 @@ xfs_attri_item_recover(
|
|||
args->op_flags = XFS_DA_OP_RECOVERY | XFS_DA_OP_OKNOENT |
|
||||
XFS_DA_OP_LOGGED;
|
||||
|
||||
ASSERT(xfs_sb_version_haslogxattrs(&mp->m_sb));
|
||||
|
||||
switch (attr->xattri_op_flags) {
|
||||
case XFS_ATTRI_OP_FLAGS_SET:
|
||||
case XFS_ATTRI_OP_FLAGS_REPLACE:
|
||||
|
|
Loading…
Reference in New Issue
Block a user