diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2008-09-12 11:27:47 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-09-17 13:23:26 +0200 |
commit | 6dcfac4f13d6b32fbaa60b64a23249999e66af8e (patch) | |
tree | 007884a8327658dc53252c7f1be9ab9daeb7ea14 /fs/ubifs/tnc.c | |
parent | UBIFS: create the name of the background thread in every case (diff) | |
download | linux-6dcfac4f13d6b32fbaa60b64a23249999e66af8e.tar.xz linux-6dcfac4f13d6b32fbaa60b64a23249999e66af8e.zip |
UBIFS: TNC / GC race fixes
- update GC sequence number if any nodes may have been moved
even if GC did not finish the LEB
- don't ignore error return when reading
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/tnc.c')
-rw-r--r-- | fs/ubifs/tnc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 7da209ab9378..7634c5970887 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -1476,7 +1476,7 @@ again: } err = fallible_read_node(c, key, &zbr, node); - if (maybe_leb_gced(c, zbr.lnum, gc_seq1)) { + if (err <= 0 || maybe_leb_gced(c, zbr.lnum, gc_seq1)) { /* * The node may have been GC'ed out from under us so try again * while keeping the TNC mutex locked. |