acl.c (f6248dd88dba3aeb19351410a027d92eee7ceb72) acl.c (14af20fcb1833dd776822361891963c90f7b0262)
1/*
2 * fs/f2fs/acl.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * Portions of this code from linux/fs/ext2/acl.c
8 *

--- 193 unchanged lines hidden (view full) ---

202
203static int __f2fs_set_acl(struct inode *inode, int type,
204 struct posix_acl *acl, struct page *ipage)
205{
206 int name_index;
207 void *value = NULL;
208 size_t size = 0;
209 int error;
1/*
2 * fs/f2fs/acl.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * Portions of this code from linux/fs/ext2/acl.c
8 *

--- 193 unchanged lines hidden (view full) ---

202
203static int __f2fs_set_acl(struct inode *inode, int type,
204 struct posix_acl *acl, struct page *ipage)
205{
206 int name_index;
207 void *value = NULL;
208 size_t size = 0;
209 int error;
210 umode_t mode = inode->i_mode;
210
211 switch (type) {
212 case ACL_TYPE_ACCESS:
213 name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
214 if (acl && !ipage) {
211
212 switch (type) {
213 case ACL_TYPE_ACCESS:
214 name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
215 if (acl && !ipage) {
215 error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
216 error = posix_acl_update_mode(inode, &mode, &acl);
216 if (error)
217 return error;
217 if (error)
218 return error;
218 set_acl_inode(inode, inode->i_mode);
219 set_acl_inode(inode, mode);
219 }
220 break;
221
222 case ACL_TYPE_DEFAULT:
223 name_index = F2FS_XATTR_INDEX_POSIX_ACL_DEFAULT;
224 if (!S_ISDIR(inode->i_mode))
225 return acl ? -EACCES : 0;
226 break;

--- 176 unchanged lines hidden ---
220 }
221 break;
222
223 case ACL_TYPE_DEFAULT:
224 name_index = F2FS_XATTR_INDEX_POSIX_ACL_DEFAULT;
225 if (!S_ISDIR(inode->i_mode))
226 return acl ? -EACCES : 0;
227 break;

--- 176 unchanged lines hidden ---