From 74020f17157e86ab9c6a773fef004f129349a38b Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 6 Jun 2006 17:31:30 -0400 Subject: [PATCH] --- yaml --- r: 38708 b: refs/heads/master c: 01eb7c07968fdab0cca0d2474346cff176537de8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/gfs2/eattr.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 2f4a8209264c..740dd6b5360f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6b61b072a8b54212ab0808c443e5c16699390d25 +refs/heads/master: 01eb7c07968fdab0cca0d2474346cff176537de8 diff --git a/trunk/fs/gfs2/eattr.c b/trunk/fs/gfs2/eattr.c index 346601538ac7..2e114c075707 100644 --- a/trunk/fs/gfs2/eattr.c +++ b/trunk/fs/gfs2/eattr.c @@ -374,8 +374,8 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh, return 0; if (er->er_data_len) { - char *prefix; - unsigned int l; + char *prefix = NULL; + unsigned int l = 0; char c = 0; if (ei->ei_size + ea_size > er->er_data_len) @@ -394,11 +394,10 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh, prefix = "security."; l = 9; break; - default: - /* FIXME: Needs looking at again */ - break; } + BUG_ON(l == 0); + memcpy(er->er_data + ei->ei_size, prefix, l); memcpy(er->er_data + ei->ei_size + l, GFS2_EA2NAME(ea), ea->ea_name_len);