diff options
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index f9b4fe88654..f936d2d6813 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -924,7 +924,6 @@ static int gfs2_security_init(struct gfs2_inode *dip, struct gfs2_inode *ip) | |||
924 | size_t len; | 924 | size_t len; |
925 | void *value; | 925 | void *value; |
926 | char *name; | 926 | char *name; |
927 | struct gfs2_ea_request er; | ||
928 | 927 | ||
929 | err = security_inode_init_security(&ip->i_inode, &dip->i_inode, | 928 | err = security_inode_init_security(&ip->i_inode, &dip->i_inode, |
930 | &name, &value, &len); | 929 | &name, &value, &len); |
@@ -935,16 +934,7 @@ static int gfs2_security_init(struct gfs2_inode *dip, struct gfs2_inode *ip) | |||
935 | return err; | 934 | return err; |
936 | } | 935 | } |
937 | 936 | ||
938 | memset(&er, 0, sizeof(struct gfs2_ea_request)); | 937 | err = gfs2_xattr_set(&ip->i_inode, GFS2_EATYPE_SECURITY, name, value, len, 0); |
939 | |||
940 | er.er_type = GFS2_EATYPE_SECURITY; | ||
941 | er.er_name = name; | ||
942 | er.er_data = value; | ||
943 | er.er_name_len = strlen(name); | ||
944 | er.er_data_len = len; | ||
945 | |||
946 | err = gfs2_ea_set_i(ip, &er); | ||
947 | |||
948 | kfree(value); | 938 | kfree(value); |
949 | kfree(name); | 939 | kfree(name); |
950 | 940 | ||