xfs_quota project check results in "project inheritance flag is not set" error https://bugzilla.redhat.com/show_bug.cgi?id=1663502 Reported-by: Steven Gardner <sgardner@xxxxxxxxxx> Signed-off-by: Achilles Gaikwad <agaikwad@xxxxxxxxxx> --- quota/project.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quota/project.c b/quota/project.c index e4e7a012..8c9be08b 100644 --- a/quota/project.c +++ b/quota/project.c @@ -99,6 +99,7 @@ check_project( { struct fsxattr fsx; int fd; + int isdir; if (recurse_depth >= 0 && data->level > recurse_depth) return -1; @@ -126,7 +127,8 @@ check_project( printf(_("%s - project identifier is not set" " (inode=%u, tree=%u)\n"), path, fsx.fsx_projid, (unsigned int)prid); - if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT)) + isdir = S_ISDIR(stat->st_mode); + if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && isdir) printf(_("%s - project inheritance flag is not set\n"), path); } -- 2.20.1