Patchwork jffs2: Fix error return in jffs2_do_read_inode_internal()

login
register
mail settings
Submitter roel kluin
Date Nov. 12, 2009, 5:09 p.m.
Message ID <4AFC415C.6040305@gmail.com>
Download mbox | patch
Permalink /patch/38259/
State New, archived
Headers show

Comments

roel kluin - Nov. 12, 2009, 5:09 p.m.
The returned error should stay negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 fs/jffs2/readinode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - Nov. 13, 2009, 8:39 a.m.
On Thu, 2009-11-12 at 18:09 +0100, Roel Kluin wrote:
> The returned error should stay negative
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
>  fs/jffs2/readinode.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Taken to my l2-mtd-2.6 tree, thanks.

Patch

diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 1a80301..9c26738 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -1284,7 +1284,7 @@  static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
 				f->target = NULL;
 				mutex_unlock(&f->sem);
 				jffs2_do_clear_inode(c, f);
-				return -ret;
+				return ret;
 			}
 
 			f->target[je32_to_cpu(latest_node->csize)] = '\0';