aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/acl.c')
-rw-r--r--fs/gfs2/acl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 906e403b054f..87f6304f2f54 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -76,9 +76,9 @@ int gfs2_acl_validate_remove(struct gfs2_inode *ip, int access)
76 return -EOPNOTSUPP; 76 return -EOPNOTSUPP;
77 if (current->fsuid != ip->i_di.di_uid && !capable(CAP_FOWNER)) 77 if (current->fsuid != ip->i_di.di_uid && !capable(CAP_FOWNER))
78 return -EPERM; 78 return -EPERM;
79 if (S_ISLNK(ip->i_di.di_mode)) 79 if (S_ISLNK(ip->i_inode.i_mode))
80 return -EOPNOTSUPP; 80 return -EOPNOTSUPP;
81 if (!access && !S_ISDIR(ip->i_di.di_mode)) 81 if (!access && !S_ISDIR(ip->i_inode.i_mode))
82 return -EACCES; 82 return -EACCES;
83 83
84 return 0; 84 return 0;
@@ -198,8 +198,8 @@ static int munge_mode(struct gfs2_inode *ip, mode_t mode)
198 error = gfs2_meta_inode_buffer(ip, &dibh); 198 error = gfs2_meta_inode_buffer(ip, &dibh);
199 if (!error) { 199 if (!error) {
200 gfs2_assert_withdraw(sdp, 200 gfs2_assert_withdraw(sdp,
201 (ip->i_di.di_mode & S_IFMT) == (mode & S_IFMT)); 201 (ip->i_inode.i_mode & S_IFMT) == (mode & S_IFMT));
202 ip->i_di.di_mode = mode; 202 ip->i_inode.i_mode = mode;
203 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 203 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
204 gfs2_dinode_out(ip, dibh->b_data); 204 gfs2_dinode_out(ip, dibh->b_data);
205 brelse(dibh); 205 brelse(dibh);
@@ -215,12 +215,12 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip)
215 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 215 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
216 struct posix_acl *acl = NULL, *clone; 216 struct posix_acl *acl = NULL, *clone;
217 struct gfs2_ea_request er; 217 struct gfs2_ea_request er;
218 mode_t mode = ip->i_di.di_mode; 218 mode_t mode = ip->i_inode.i_mode;
219 int error; 219 int error;
220 220
221 if (!sdp->sd_args.ar_posix_acl) 221 if (!sdp->sd_args.ar_posix_acl)
222 return 0; 222 return 0;
223 if (S_ISLNK(ip->i_di.di_mode)) 223 if (S_ISLNK(ip->i_inode.i_mode))
224 return 0; 224 return 0;
225 225
226 memset(&er, 0, sizeof(struct gfs2_ea_request)); 226 memset(&er, 0, sizeof(struct gfs2_ea_request));
@@ -232,7 +232,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip)
232 return error; 232 return error;
233 if (!acl) { 233 if (!acl) {
234 mode &= ~current->fs->umask; 234 mode &= ~current->fs->umask;
235 if (mode != ip->i_di.di_mode) 235 if (mode != ip->i_inode.i_mode)
236 error = munge_mode(ip, mode); 236 error = munge_mode(ip, mode);
237 return error; 237 return error;
238 } 238 }
@@ -244,7 +244,7 @@ int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip)
244 posix_acl_release(acl); 244 posix_acl_release(acl);
245 acl = clone; 245 acl = clone;
246 246
247 if (S_ISDIR(ip->i_di.di_mode)) { 247 if (S_ISDIR(ip->i_inode.i_mode)) {
248 er.er_name = GFS2_POSIX_ACL_DEFAULT; 248 er.er_name = GFS2_POSIX_ACL_DEFAULT;
249 er.er_name_len = GFS2_POSIX_ACL_DEFAULT_LEN; 249 er.er_name_len = GFS2_POSIX_ACL_DEFAULT_LEN;
250 error = gfs2_system_eaops.eo_set(ip, &er); 250 error = gfs2_system_eaops.eo_set(ip, &er);