diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-11-23 08:31:51 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-11-23 08:31:51 -0500 |
commit | 018a01cd27b3448a7c65272ccb1a1cbab6c2667e (patch) | |
tree | fa781a1cbe10a7c9c8d87f17c63d013e78d8a65e | |
parent | 6a8099ed5677ac1bb2c74b74a31fecb8282f56c2 (diff) |
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: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/acl.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 65978d7885c8..230eb0f005b6 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c | |||
@@ -38,8 +38,9 @@ static const char *gfs2_acl_name(int type) | |||
38 | return NULL; | 38 | return NULL; |
39 | } | 39 | } |
40 | 40 | ||
41 | static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type) | 41 | struct posix_acl *gfs2_get_acl(struct inode *inode, int type) |
42 | { | 42 | { |
43 | struct gfs2_inode *ip = GFS2_I(inode); | ||
43 | struct posix_acl *acl; | 44 | struct posix_acl *acl; |
44 | const char *name; | 45 | const char *name; |
45 | char *data; | 46 | char *data; |
@@ -67,11 +68,6 @@ static struct posix_acl *gfs2_acl_get(struct gfs2_inode *ip, int type) | |||
67 | return acl; | 68 | return acl; |
68 | } | 69 | } |
69 | 70 | ||
70 | struct posix_acl *gfs2_get_acl(struct inode *inode, int type) | ||
71 | { | ||
72 | return gfs2_acl_get(GFS2_I(inode), type); | ||
73 | } | ||
74 | |||
75 | static int gfs2_set_mode(struct inode *inode, umode_t mode) | 71 | static int gfs2_set_mode(struct inode *inode, umode_t mode) |
76 | { | 72 | { |
77 | int error = 0; | 73 | int error = 0; |
@@ -125,7 +121,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct inode *inode) | |||
125 | if (S_ISLNK(inode->i_mode)) | 121 | if (S_ISLNK(inode->i_mode)) |
126 | return 0; | 122 | return 0; |
127 | 123 | ||
128 | acl = gfs2_acl_get(dip, ACL_TYPE_DEFAULT); | 124 | acl = gfs2_get_acl(&dip->i_inode, ACL_TYPE_DEFAULT); |
129 | if (IS_ERR(acl)) | 125 | if (IS_ERR(acl)) |
130 | return PTR_ERR(acl); | 126 | return PTR_ERR(acl); |
131 | if (!acl) { | 127 | if (!acl) { |
@@ -166,7 +162,7 @@ int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr) | |||
166 | unsigned int len; | 162 | unsigned int len; |
167 | int error; | 163 | int error; |
168 | 164 | ||
169 | acl = gfs2_acl_get(ip, ACL_TYPE_ACCESS); | 165 | acl = gfs2_get_acl(&ip->i_inode, ACL_TYPE_ACCESS); |
170 | if (IS_ERR(acl)) | 166 | if (IS_ERR(acl)) |
171 | return PTR_ERR(acl); | 167 | return PTR_ERR(acl); |
172 | if (!acl) | 168 | if (!acl) |
@@ -216,7 +212,7 @@ static int gfs2_xattr_system_get(struct dentry *dentry, const char *name, | |||
216 | if (type < 0) | 212 | if (type < 0) |
217 | return type; | 213 | return type; |
218 | 214 | ||
219 | acl = gfs2_acl_get(GFS2_I(inode), type); | 215 | acl = gfs2_get_acl(inode, type); |
220 | if (IS_ERR(acl)) | 216 | if (IS_ERR(acl)) |
221 | return PTR_ERR(acl); | 217 | return PTR_ERR(acl); |
222 | if (acl == NULL) | 218 | if (acl == NULL) |