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@xxxxxxxxxx> --- 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