From patchwork Sun Jan 6 10:28:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achilles Gaikwad X-Patchwork-Id: 10749491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 581D314E2 for ; Sun, 6 Jan 2019 10:28:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49035288BA for ; Sun, 6 Jan 2019 10:28:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C53F288D2; Sun, 6 Jan 2019 10:28:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD895288BA for ; Sun, 6 Jan 2019 10:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726169AbfAFK2P (ORCPT ); Sun, 6 Jan 2019 05:28:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58510 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbfAFK2P (ORCPT ); Sun, 6 Jan 2019 05:28:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB68D58E2B; Sun, 6 Jan 2019 10:28:15 +0000 (UTC) Received: from nevermore.lan (ovpn-116-23.sin2.redhat.com [10.67.116.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F2A05D75F; Sun, 6 Jan 2019 10:28:12 +0000 (UTC) Date: Sun, 6 Jan 2019 15:58:07 +0530 From: Achilles Gaikwad To: linux-xfs@vger.kernel.org Cc: sandeen@sandeen.net, sgardner@redhat.com, darrick.wong@oracle.com Subject: [PATCH v2] xfs_quota: fix false error reporting of project inheritance flag is not set Message-ID: <20190106102745.GA7347@nevermore.lan> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sun, 06 Jan 2019 10:28:15 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Achilles Gaikwad Reviewed-by: Darrick J. Wong --- quota/project.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quota/project.c b/quota/project.c index e4e7a012..11f3be04 100644 --- a/quota/project.c +++ b/quota/project.c @@ -126,7 +126,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); }