aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/eattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r--fs/gfs2/eattr.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index f5169a42a91..187fba1c467 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -368,7 +368,7 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh,
368{ 368{
369 struct ea_list *ei = private; 369 struct ea_list *ei = private;
370 struct gfs2_ea_request *er = ei->ei_er; 370 struct gfs2_ea_request *er = ei->ei_er;
371 unsigned int ea_size = GFS2_EA_STRLEN(ea); 371 unsigned int ea_size = gfs2_ea_strlen(ea);
372 372
373 if (ea->ea_type == GFS2_EATYPE_UNUSED) 373 if (ea->ea_type == GFS2_EATYPE_UNUSED)
374 return 0; 374 return 0;
@@ -381,12 +381,21 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh,
381 if (ei->ei_size + ea_size > er->er_data_len) 381 if (ei->ei_size + ea_size > er->er_data_len)
382 return -ERANGE; 382 return -ERANGE;
383 383
384 if (ea->ea_type == GFS2_EATYPE_USR) { 384 switch (ea->ea_type) {
385 case GFS2_EATYPE_USR:
385 prefix = "user."; 386 prefix = "user.";
386 l = 5; 387 l = 5;
387 } else { 388 break;
389 case GFS2_EATYPE_SYS:
388 prefix = "system."; 390 prefix = "system.";
389 l = 7; 391 l = 7;
392 break;
393 case GFS2_EATYPE_SECURITY:
394 prefix = "security.";
395 l = 9;
396 break;
397 default:
398 break;
390 } 399 }
391 400
392 memcpy(er->er_data + ei->ei_size, 401 memcpy(er->er_data + ei->ei_size,