UBIFS: do not treat ENOSPC specially
'ubifs_garbage_collect_leb()' should never return '-ENOSPC', and if it does, this is an error. Thus, do not treat this error code specially. '-EAGAIN' is a special error code, but not '-ENOSPC'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
5ffef88ffe
commit
efe1881f54
|
@ -677,14 +677,12 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway)
|
||||||
|
|
||||||
ret = ubifs_garbage_collect_leb(c, &lp);
|
ret = ubifs_garbage_collect_leb(c, &lp);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret == -EAGAIN || ret == -ENOSPC) {
|
if (ret == -EAGAIN) {
|
||||||
/*
|
/*
|
||||||
* These codes are not errors, so we have to
|
* This is not error, so we have to return the
|
||||||
* return the LEB to lprops. But if the
|
* LEB to lprops. But if 'ubifs_return_leb()'
|
||||||
* 'ubifs_return_leb()' function fails, its
|
* fails, its failure code is propagated to the
|
||||||
* failure code is propagated to the caller
|
* caller instead of the original '-EAGAIN'.
|
||||||
* instead of the original '-EAGAIN' or
|
|
||||||
* '-ENOSPC'.
|
|
||||||
*/
|
*/
|
||||||
err = ubifs_return_leb(c, lp.lnum);
|
err = ubifs_return_leb(c, lp.lnum);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Reference in New Issue