aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-08-04 07:06:06 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-08-30 03:19:06 -0400
commitefe1881f5482f94f5e5e6cb74bf3ea72f2b5b9ce (patch)
tree3009b20fd4e0530e75cd9d5c4a3933133ec0cfce /fs/ubifs
parent5ffef88ffeb730e1bf2da56a39a55e03d57a66c9 (diff)
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>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/gc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index f89a422ca395..ee4b05de4d48 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -677,14 +677,12 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway)
677 677
678 ret = ubifs_garbage_collect_leb(c, &lp); 678 ret = ubifs_garbage_collect_leb(c, &lp);
679 if (ret < 0) { 679 if (ret < 0) {
680 if (ret == -EAGAIN || ret == -ENOSPC) { 680 if (ret == -EAGAIN) {
681 /* 681 /*
682 * These codes are not errors, so we have to 682 * This is not error, so we have to return the
683 * return the LEB to lprops. But if the 683 * LEB to lprops. But if 'ubifs_return_leb()'
684 * 'ubifs_return_leb()' function fails, its 684 * fails, its failure code is propagated to the
685 * failure code is propagated to the caller 685 * caller instead of the original '-EAGAIN'.
686 * instead of the original '-EAGAIN' or
687 * '-ENOSPC'.
688 */ 686 */
689 err = ubifs_return_leb(c, lp.lnum); 687 err = ubifs_return_leb(c, lp.lnum);
690 if (err) 688 if (err)