diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-04-21 17:53:52 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-03 07:47:39 +0200 |
commit | 2f149c797f54b92b42a863ed8a5527ba2c682acc (patch) | |
tree | 00626b85a2de72471d24157e5de5d156b7ff8000 /fs | |
parent | 6e34dc89b918885bcfa4ad9af462852e26e893b1 (diff) |
f2fs: fix to detect failure of dquot_initialize
[ Upstream commit c22aecd75919511abea872b201751e0be1add898 ]
dquot_initialize() can fail due to any exception inside quota subsystem,
f2fs needs to be aware of it, and return correct return value to caller.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ffa20409c703..1dba4d22c6d7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2571,7 +2571,9 @@ static int f2fs_ioc_setproject(struct file *filp, __u32 projid) } f2fs_put_page(ipage, 1); - dquot_initialize(inode); + err = dquot_initialize(inode); + if (err) + goto out_unlock; transfer_to[PRJQUOTA] = dqget(sb, make_kqid_projid(kprojid)); if (!IS_ERR(transfer_to[PRJQUOTA])) { |