mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
staging: lustre: llite: correct removexattr detection
[ Upstream commit 1b60f6dfa3 ]
In ll_xattr_set_common() detect the removexattr() case correctly by
testing for a NULL value as well as XATTR_REPLACE.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10787
Reviewed-on: https://review.whamcloud.com/
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fea5a0d878
commit
e906355a7f
@@ -93,7 +93,11 @@ ll_xattr_set_common(const struct xattr_handler *handler,
|
||||
__u64 valid;
|
||||
int rc;
|
||||
|
||||
if (flags == XATTR_REPLACE) {
|
||||
/* When setxattr() is called with a size of 0 the value is
|
||||
* unconditionally replaced by "". When removexattr() is
|
||||
* called we get a NULL value and XATTR_REPLACE for flags.
|
||||
*/
|
||||
if (!value && flags == XATTR_REPLACE) {
|
||||
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1);
|
||||
valid = OBD_MD_FLXATTRRM;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user