* [PATCH] ext4: fix to propagate error from dquot_initialize()
@ 2018-09-17 7:22 Chao Yu
[not found] ` <CAP9B-QmoV0RtDMpuKhEAgg4Pq+38bbPoXwXWdkFV8DHzopW-8g@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Chao Yu @ 2018-09-17 7:22 UTC (permalink / raw)
To: Theodore Ts'o, Andreas Dilger, open list:EXT4 FILE SYSTEM,
open list
Cc: chao, Chao Yu
In ext4_ioctl_setproject(), we forgot to check error return from
dquot_initialize(), if we ignore such error, later, quota info can
be out-of-update, fix it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
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 a7074115d6f6..e6d11cb07e87 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -364,7 +364,9 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
brelse(iloc.bh);
}
- dquot_initialize(inode);
+ err = dquot_initialize(inode);
+ if (err)
+ goto out_unlock;
handle = ext4_journal_start(inode, EXT4_HT_QUOTA,
EXT4_QUOTA_INIT_BLOCKS(sb) +
--
2.18.0.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: fix to propagate error from dquot_initialize()
[not found] ` <CAP9B-QmoV0RtDMpuKhEAgg4Pq+38bbPoXwXWdkFV8DHzopW-8g@mail.gmail.com>
@ 2018-09-17 8:33 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-09-17 8:33 UTC (permalink / raw)
To: Wang Shilong
Cc: Theodore Ts'o, adilger.kernel, Ext4 Developers List,
linux-kernel, chao
Hi Shilong,
On 2018/9/17 16:18, Wang Shilong wrote:
> Hi Chao,
>
> I sent a early patch series which included this but forgot to send to
> f2fs list..
> https://patchwork.ozlabs.org/patch/968759/
Oh, sorry, I didn't notice that one.
To all, please ignore this reduplicated one.
>
> It looks Ted still have some questions for my first patch, so that second patch
> is not applied yet..
>
> Thanks,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-17 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 7:22 [PATCH] ext4: fix to propagate error from dquot_initialize() Chao Yu
[not found] ` <CAP9B-QmoV0RtDMpuKhEAgg4Pq+38bbPoXwXWdkFV8DHzopW-8g@mail.gmail.com>
2018-09-17 8:33 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox