From 951e17bc456bd3a2e184bcf829f8515f8d6fb6b5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 11 May 2020 16:48:25 -0400 Subject: [PATCH] db: ensure that create and replace are exclusive in attr_set_f Clear the other flag when applying the create or replace option, as the low-level libxfs can't handle both at the same time. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- db/attrset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/attrset.c b/db/attrset.c index e35752711..b86ecec70 100644 --- a/db/attrset.c +++ b/db/attrset.c @@ -99,9 +99,11 @@ attr_set_f( /* modifiers */ case 'C': args.attr_flags |= XATTR_CREATE; + args.attr_flags &= ~XATTR_REPLACE; break; case 'R': args.attr_flags |= XATTR_REPLACE; + args.attr_flags &= ~XATTR_CREATE; break; case 'n': -- 2.50.1