All of lore.kernel.org
 help / color / mirror / Atom feed
From: Achilles Gaikwad <agaikwad@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: sgardner@redhat.com, sandeen@redhat.com
Subject: [PATCH] xfs_quota: fix false error reporting of project inheritance flag is not set
Date: Sat, 5 Jan 2019 15:56:01 +0530	[thread overview]
Message-ID: <20190105102556.GA4200@nevermore.lan> (raw)

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

             reply	other threads:[~2019-01-05 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 10:26 Achilles Gaikwad [this message]
2019-01-05 17:46 ` [PATCH] xfs_quota: fix false error reporting of project inheritance flag is not set Darrick J. Wong
2019-01-05 17:50   ` Eric Sandeen
2019-01-06 10:26     ` Achilles Gaikwad
2019-01-05 17:48 ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190105102556.GA4200@nevermore.lan \
    --to=agaikwad@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sgardner@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.