]> git.baikalelectronics.ru Git - kernel.git/commit
quota: propagate error from __dquot_initialize
authorChao Yu <yuchao0@huawei.com>
Tue, 28 Nov 2017 15:01:44 +0000 (23:01 +0800)
committerJan Kara <jack@suse.cz>
Tue, 28 Nov 2017 15:08:08 +0000 (16:08 +0100)
commit03995c31c436e6f6cd63d56ea7d2a66f2e4a72d8
tree7df33341a7f8cf7f1eb9b3e9bf972b0cac034224
parentb010831dda0748f38100cba0b256e9c66f2cb0bb
quota: propagate error from __dquot_initialize

In commit 7a0902f4524e ("quota: Propagate error from ->acquire_dquot()"),
we have propagated error from __dquot_initialize to caller, but we forgot
to handle such error in add_dquot_ref(), so, currently, during quota
accounting information initialization flow, if we failed for some of
inodes, we just ignore such error, and do account for others, which is
not a good implementation.

In this patch, we choose to let user be aware of such error, so after
turning on quota successfully, we can make sure all inodes disk usage
can be accounted, which will be more reasonable.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c