]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't change inode mode if ACL update fails
authorDave Chinner <dchinner@redhat.com>
Mon, 9 Oct 2017 18:37:23 +0000 (11:37 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Oct 2017 17:21:06 +0000 (10:21 -0700)
commit7618f2e27e984fc8c85a54698916e42dd964ed0f
tree2acf8db2af000b61a418b2041e67531fd9ab24cf
parent0006bde8f523110418184509d6d22c21e17efeae
xfs: don't change inode mode if ACL update fails

If we get ENOSPC half way through setting the ACL, the inode mode
can still be changed even though the ACL does not exist. Reorder the
operation to only change the mode of the inode if the ACL is set
correctly.

Whilst this does not fix the problem with crash consistency (that requires
attribute addition to be a deferred op) it does prevent ENOSPC and other
non-fatal errors setting an xattr to be handled sanely.

This fixes xfstests generic/449.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_acl.c