From: Christoph Hellwig Date: Mon, 11 May 2020 20:48:25 +0000 (-0400) Subject: db: ensure that create and replace are exclusive in attr_set_f X-Git-Tag: xfsprogs-5.7-fixes_2020-06-25~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=951e17bc456bd3a2e184bcf829f8515f8d6fb6b5;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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':