All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_quota: fix false error reporting of project inheritance flag is not set
@ 2019-01-05 10:26 Achilles Gaikwad
  2019-01-05 17:46 ` Darrick J. Wong
  2019-01-05 17:48 ` Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Achilles Gaikwad @ 2019-01-05 10:26 UTC (permalink / raw)
  To: linux-xfs; +Cc: sgardner, sandeen

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@redhat.com>
Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-06 10:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-05 10:26 [PATCH] xfs_quota: fix false error reporting of project inheritance flag is not set Achilles Gaikwad
2019-01-05 17:46 ` Darrick J. Wong
2019-01-05 17:50   ` Eric Sandeen
2019-01-06 10:26     ` Achilles Gaikwad
2019-01-05 17:48 ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.