diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/xattr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c index cf694de4991a..ea09e41dbb49 100644 --- a/fs/gfs2/xattr.c +++ b/fs/gfs2/xattr.c @@ -1210,8 +1210,12 @@ int __gfs2_xattr_set(struct inode *inode, const char *name, if (namel > GFS2_EA_MAX_NAME_LEN) return -ERANGE; - if (value == NULL) - return gfs2_xattr_remove(ip, type, name); + if (value == NULL) { + error = gfs2_xattr_remove(ip, type, name); + if (error == -ENODATA && !(flags & XATTR_REPLACE)) + error = 0; + return error; + } if (ea_check_size(sdp, namel, size)) return -ERANGE; |