Commit 018a01cd authored by Steven Whitehouse's avatar Steven Whitehouse

GFS2: We only need one ACL getting function

There is no need to have two versions of this function with
slightly different arguments.
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 6a8099ed
...@@ -38,8 +38,9 @@ static const char *gfs2_acl_name(int type) ...@@ -38,8 +38,9 @@ static const char *gfs2_acl_name(int type)
return NULL; return NULL;
} }
static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type) struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
{ {
struct gfs2_inode *ip = GFS2_I(inode);
struct posix_acl *acl; struct posix_acl *acl;
const char *name; const char *name;
char *data; char *data;
...@@ -67,11 +68,6 @@ static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type) ...@@ -67,11 +68,6 @@ static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type)
return acl; return acl;
} }
struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
{
return gfs2_acl_get(GFS2_I(inode), type);
}
static int gfs2_set_mode(struct inode *inode, umode_t mode) static int gfs2_set_mode(struct inode *inode, umode_t mode)
{ {
int error = 0; int error = 0;
...@@ -125,7 +121,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode) ...@@ -125,7 +121,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode)
if (S_ISLNK(inode->i_mode)) if (S_ISLNK(inode->i_mode))
return 0; return 0;
acl = gfs2_acl_get(dip, ACL_TYPE_DEFAULT); acl = gfs2_get_acl(&dip->i_inode, ACL_TYPE_DEFAULT);
if (IS_ERR(acl)) if (IS_ERR(acl))
return PTR_ERR(acl); return PTR_ERR(acl);
if (!acl) { if (!acl) {
...@@ -166,7 +162,7 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr) ...@@ -166,7 +162,7 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr)
unsigned int len; unsigned int len;
int error; int error;
acl = gfs2_acl_get(ip, ACL_TYPE_ACCESS); acl = gfs2_get_acl(&ip->i_inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl)) if (IS_ERR(acl))
return PTR_ERR(acl); return PTR_ERR(acl);
if (!acl) if (!acl)
...@@ -216,7 +212,7 @@ static int gfs2_xattr_system_get(struct dentry *dentry, const char *name, ...@@ -216,7 +212,7 @@ static int gfs2_xattr_system_get(struct dentry *dentry, const char *name,
if (type < 0) if (type < 0)
return type; return type;
acl = gfs2_acl_get(GFS2_I(inode), type); acl = gfs2_get_acl(inode, type);
if (IS_ERR(acl)) if (IS_ERR(acl))
return PTR_ERR(acl); return PTR_ERR(acl);
if (acl == NULL) if (acl == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment