aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/eattr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index 346601538ac7..2e114c075707 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -374,8 +374,8 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh,
374 return 0; 374 return 0;
375 375
376 if (er->er_data_len) { 376 if (er->er_data_len) {
377 char *prefix; 377 char *prefix = NULL;
378 unsigned int l; 378 unsigned int l = 0;
379 char c = 0; 379 char c = 0;
380 380
381 if (ei->ei_size + ea_size > er->er_data_len) 381 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,
394 prefix = "security."; 394 prefix = "security.";
395 l = 9; 395 l = 9;
396 break; 396 break;
397 default:
398 /* FIXME: Needs looking at again */
399 break;
400 } 397 }
401 398
399 BUG_ON(l == 0);
400
402 memcpy(er->er_data + ei->ei_size, prefix, l); 401 memcpy(er->er_data + ei->ei_size, prefix, l);
403 memcpy(er->er_data + ei->ei_size + l, GFS2_EA2NAME(ea), 402 memcpy(er->er_data + ei->ei_size + l, GFS2_EA2NAME(ea),
404 ea->ea_name_len); 403 ea->ea_name_len);