X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fgfs2%2Feaops.c;h=cd747c00f670363db6f2dbe41164858e56b4778f;hb=2b2842146cb4105877c2be51d3857ec61ebd4ff9;hp=3ace242f2b1684ab059d4a9afb4a2a7239056451;hpb=43f5d210a02dcf9d8bafb147044f27add10a459a;p=linux-2.6 diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 3ace242f2b..cd747c00f6 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include @@ -14,10 +14,10 @@ #include #include #include +#include #include #include "gfs2.h" -#include "lm_interface.h" #include "incore.h" #include "acl.h" #include "eaops.h" @@ -31,22 +31,22 @@ * Returns: GFS2_EATYPE_XXX */ -unsigned int gfs2_ea_name2type(const char *name, char **truncated_name) +unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name) { unsigned int type; if (strncmp(name, "system.", 7) == 0) { type = GFS2_EATYPE_SYS; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("system.") - 1; } else if (strncmp(name, "user.", 5) == 0) { type = GFS2_EATYPE_USR; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("user.") - 1; } else if (strncmp(name, "security.", 9) == 0) { type = GFS2_EATYPE_SECURITY; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("security.") - 1; } else { type = GFS2_EATYPE_UNUSED; if (truncated_name) @@ -120,7 +120,7 @@ static int system_eo_set(struct gfs2_inode *ip, struct gfs2_ea_request *er) if (GFS2_ACL_IS_ACCESS(er->er_name, er->er_name_len)) { if (!(er->er_flags & GFS2_ERF_MODE)) { - er->er_mode = ip->i_di.di_mode; + er->er_mode = ip->i_inode.i_mode; er->er_flags |= GFS2_ERF_MODE; } error = gfs2_acl_validate_set(ip, 1, er, @@ -146,7 +146,7 @@ static int system_eo_set(struct gfs2_inode *ip, struct gfs2_ea_request *er) if (error == -ENODATA) error = 0; } - return error; + return error; } return -EPERM;