Skip to content
Commit 54aae14b authored by Ernesto A. Fernández's avatar Ernesto A. Fernández Committed by Bob Peterson
Browse files

gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing



The function __gfs2_xattr_set() will return -ENODATA when called to
remove a xattr that does not exist. The result is that setfacl will
show an exit status of 1 when called to set only a file's mode bits
(on a file with no ACLs), despite succeeding. A "No data available"
error will be printed as well.

To fix this return 0 instead, except when the XATTR_REPLACE flag is
set, in which case -ENODATA is appropriate. This is consistent with
how most other xattr setting functions work, in other filesystems.

Signed-off-by: default avatarErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
parent c4a9d189
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment