]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 16 Nov 2017 13:23:22 +0000 (11:23 -0200)
commit91437e82e3a05b3f4c68c877a47dade228e3789f
treefdb851e7a776a4582ed54dd80b858b0fc5e4976c
parent09830579eb3b560b0681e5489ecf345a4580fae1
xfs: don't change inode mode if ACL update fails

BugLink: http://bugs.launchpad.net/bugs/1731951
commit 67f2ffe31d1a683170c2ba0ecc643e42a5fdd397 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/xfs/xfs_acl.c