From: Wang Shilong <wangshilong1991@gmail.com>
To: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: adilger@dilger.ca, wshilong@ddn.com, dchinner@redhat.com
Subject: [PATCH v2 2/3] ext4: fix to detect failure of dquot_initialize in project ioctl
Date: Wed, 12 Sep 2018 08:57:17 +0900 [thread overview]
Message-ID: <1536710238-16858-2-git-send-email-wshilong1991@gmail.com> (raw)
In-Reply-To: <1536710238-16858-1-git-send-email-wshilong1991@gmail.com>
From: Wang Shilong <wshilong@ddn.com>
We return most failure of dquota_initialize() except
inode evict, this could make a bit sense, for example
we allow file removal even quota files are broken?
But it dosen't make sense to allow setting project
if quota files etc are broken.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
v1->v2:
based it on one patchset, to make reviewers happy.
---
fs/ext4/ioctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index f81102bd3203..781dd699bd7b 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -359,7 +359,9 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
brelse(iloc.bh);
}
- dquot_initialize(inode);
+ err = dquot_initialize(inode);
+ if (err)
+ return err;
handle = ext4_journal_start(inode, EXT4_HT_QUOTA,
EXT4_QUOTA_INIT_BLOCKS(sb) +
--
2.17.1
next prev parent reply other threads:[~2018-09-11 23:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 23:57 [PATCH v3 1/3] ext4: fix setattr project check upon fssetxattr ioctl Wang Shilong
2018-09-11 23:57 ` Wang Shilong [this message]
2018-09-11 23:57 ` [PATCH v4 3/3] f2fs: " Wang Shilong
2018-09-16 3:55 ` [PATCH v3 1/3] ext4: " Theodore Y. Ts'o
2018-09-16 4:02 ` Wang Shilong
2018-09-16 12:20 ` Theodore Y. Ts'o
2018-09-16 12:25 ` Wang Shilong
2018-09-17 5:18 ` Wang Shilong
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=1536710238-16858-2-git-send-email-wshilong1991@gmail.com \
--to=wangshilong1991@gmail.com \
--cc=adilger@dilger.ca \
--cc=dchinner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=wshilong@ddn.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).