summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-11 15:01:37 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-17 04:48:28 (GMT)
commit16deae329e6b9a0a500d70c0cc4023c799b644d9 (patch)
tree14bed01e332e5fd62191cfff26db65334d881acc
parenta7d0c9176bb6e15c483a020816b2ecb60716f79a (diff)
downloadlinux-fsl-qoriq-16deae329e6b9a0a500d70c0cc4023c799b644d9.tar.xz
GFS2: return error if malloc failed in gfs2_rs_alloc()
commit 441362d06be349430d06e37286adce4b90e6ce96 upstream. The error code in gfs2_rs_alloc() is set to ENOMEM when error but never be used, instead, gfs2_rs_alloc() always return 0. Fix to return 'error'. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/gfs2/rgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index b7eff07..9afba3d6 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -576,7 +576,7 @@ int gfs2_rs_alloc(struct gfs2_inode *ip)
RB_CLEAR_NODE(&ip->i_res->rs_node);
out:
up_write(&ip->i_rw_mutex);
- return 0;
+ return error;
}
static void dump_rs(struct seq_file *seq, const struct gfs2_blkreserv *rs)