]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_quota: fix false error reporting of project inheritance flag is not set
authorAchilles Gaikwad <agaikwad@redhat.com>
Mon, 28 Jan 2019 19:03:08 +0000 (13:03 -0600)
committerEric Sandeen <sandeen@redhat.com>
Mon, 28 Jan 2019 19:03:08 +0000 (13:03 -0600)
After kernel commit:

9336e3a7 "xfs: project id inheritance is a directory only flag"

xfs stopped setting the project inheritance flag on regular files, but
userspace quota code still checks for it and will now issue the error:

"project inheritance flag is not set"

for every regular file during quotacheck.  Fix this by only checking
for the flag on directories.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1663502
Reported-by: Steven Gardner <sgardner@redhat.com>
Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
quota/project.c

index 78ede9e5cdad94a1d2fb7fd7ce55ff13e2c5a52e..7c22947c74f9afb7e8bfd5fd0f10a40de81090b4 100644 (file)
@@ -114,7 +114,7 @@ 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))
+               if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && S_ISDIR(stat->st_mode))
                        printf(_("%s - project inheritance flag is not set\n"),
                                path);
        }