]>
Commit | Line | Data |
---|---|---|
a65d4bac GKH |
1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
2 | From: Chao Yu <yuchao0@huawei.com> | |
3 | Date: Sat, 21 Apr 2018 17:53:52 +0800 | |
4 | Subject: f2fs: fix to detect failure of dquot_initialize | |
5 | ||
6 | From: Chao Yu <yuchao0@huawei.com> | |
7 | ||
8 | [ Upstream commit c22aecd75919511abea872b201751e0be1add898 ] | |
9 | ||
10 | dquot_initialize() can fail due to any exception inside quota subsystem, | |
11 | f2fs needs to be aware of it, and return correct return value to caller. | |
12 | ||
13 | Signed-off-by: Chao Yu <yuchao0@huawei.com> | |
14 | Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> | |
15 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
17 | --- | |
18 | fs/f2fs/file.c | 4 +++- | |
19 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
20 | ||
21 | --- a/fs/f2fs/file.c | |
22 | +++ b/fs/f2fs/file.c | |
23 | @@ -2493,7 +2493,9 @@ static int f2fs_ioc_setproject(struct fi | |
24 | } | |
25 | f2fs_put_page(ipage, 1); | |
26 | ||
27 | - dquot_initialize(inode); | |
28 | + err = dquot_initialize(inode); | |
29 | + if (err) | |
30 | + goto out_unlock; | |
31 | ||
32 | transfer_to[PRJQUOTA] = dqget(sb, make_kqid_projid(kprojid)); | |
33 | if (!IS_ERR(transfer_to[PRJQUOTA])) { |