Regular file or directory can have projid. So if an entry is
not regular AND not directory, set projid to 0.
Change-Id: Id9e7dd471513817ac1cb9d146563b369f9ebe2eb
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Reviewed-on: https://review.whamcloud.com/43447
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
const char *path = object->u.lo_posix.lop_path;
LASSERT(attrs->loa_attr_bits & LIPE_OBJECT_ATTR_ATTR);
- if (((attrs->loa_mode & S_IFMT) != S_IFREG) ||
- ((attrs->loa_mode & S_IFMT) != S_IFDIR)) {
+ if (!S_ISREG(attrs->loa_mode) && !S_ISDIR(attrs->loa_mode)) {
attrs->loa_projid = 0;
attrs->loa_attr_bits |= LIPE_OBJECT_ATTR_PROJID;
return 0;