diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-03 14:03:25 +0300 |
---|---|---|
committer | Artem Bityutskiy <dedekind1@gmail.com> | 2011-07-04 10:54:33 +0300 |
commit | d304820a1f6cdacab691bbcb7faa35ec631c6398 (patch) | |
tree | b958f273673000d68a2dc088298425ae1f32e85f /fs/ubifs/tnc.c | |
parent | 83cef708c606f46a2b527af025acb3d24555f0c4 (diff) | |
download | op-kernel-dev-d304820a1f6cdacab691bbcb7faa35ec631c6398.zip op-kernel-dev-d304820a1f6cdacab691bbcb7faa35ec631c6398.tar.gz |
UBIFS: switch to ubifs_leb_read
Instead of using 'ubi_read()' function directly, used the 'ubifs_leb_read()'
helper function instead. This allows to get rid of several redundant error
messages and make sure that we always have a stack dump on read errors.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/tnc.c')
-rw-r--r-- | fs/ubifs/tnc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 526b63c..0667386 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -462,7 +462,7 @@ static int try_read_node(const struct ubifs_info *c, void *buf, int type, dbg_io("LEB %d:%d, %s, length %d", lnum, offs, dbg_ntype(type), len); - err = ubi_read(c->ubi, lnum, buf, offs, len); + err = ubifs_leb_read(c, lnum, buf, offs, len, 1); if (err) { ubifs_err("cannot read node type %d from LEB %d:%d, error %d", type, lnum, offs, err); @@ -1666,7 +1666,7 @@ static int read_wbuf(struct ubifs_wbuf *wbuf, void *buf, int len, int lnum, if (!overlap) { /* We may safely unlock the write-buffer and read the data */ spin_unlock(&wbuf->lock); - return ubi_read(c->ubi, lnum, buf, offs, len); + return ubifs_leb_read(c, lnum, buf, offs, len, 0); } /* Don't read under wbuf */ @@ -1680,7 +1680,7 @@ static int read_wbuf(struct ubifs_wbuf *wbuf, void *buf, int len, int lnum, if (rlen > 0) /* Read everything that goes before write-buffer */ - return ubi_read(c->ubi, lnum, buf, offs, rlen); + return ubifs_leb_read(c, lnum, buf, offs, rlen, 0); return 0; } @@ -1767,7 +1767,7 @@ int ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu) if (wbuf) err = read_wbuf(wbuf, bu->buf, len, lnum, offs); else - err = ubi_read(c->ubi, lnum, bu->buf, offs, len); + err = ubifs_leb_read(c, lnum, bu->buf, offs, len, 0); /* Check for a race with GC */ if (maybe_leb_gced(c, lnum, bu->gc_seq)) |