If the mask is zero, then the cap check will succeed, "yes" will be
true and we'll end up returning quickly from _getattr anyway.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
if (r < 0)
return r;
- if (mask && !in->caps_issued_mask(mask)) {
- r = _getattr(in, mask, perms);
- if (r < 0) {
- ldout(cct, 3) << "statx exit on error!" << dendl;
- return r;
- }
+ r = _getattr(in, mask, perms);
+ if (r < 0) {
+ ldout(cct, 3) << "statx exit on error!" << dendl;
+ return r;
}
fill_statx(in, mask, stx);