Skip to content

Commit

Permalink
GFS2: return error if malloc failed in gfs2_rs_alloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Steven Whitehouse committed Apr 4, 2013
1 parent 4146c3d commit 441362d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 441362d

Please sign in to comment.