]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commitdiff
GFS2: return error if malloc failed in gfs2_rs_alloc()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 11 Mar 2013 15:01:37 +0000 (23:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2013 04:48:28 +0000 (21:48 -0700)
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>
fs/gfs2/rgrp.c

index b7eff078fe90f88f6561978b1917e50658482011..9afba3d63dff222528ab7d7eb912cc0200bb54f9 100644 (file)
@@ -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)