Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1685337
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] f2fs: Don't clear SGID when inheriting ACLs |
| Date | 2017-07-11 23:00 +0200 |
| Message-ID | <u2aqe-77a-23@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This patch copies commit b7f8a09f80:
"btrfs: Don't clear SGID when inheriting ACLs" written by Jan.
Fixes: 073931017b49d9458aa351605b43a7e34598caef
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/acl.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index a140c5e3dc54..da77352c5ad3 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -211,12 +211,8 @@ static int __f2fs_set_acl(struct inode *inode, int type,
switch (type) {
case ACL_TYPE_ACCESS:
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
- if (acl) {
- error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
- if (error)
- return error;
+ if (acl)
set_acl_inode(inode, inode->i_mode);
- }
break;
case ACL_TYPE_DEFAULT:
@@ -249,6 +245,13 @@ static int __f2fs_set_acl(struct inode *inode, int type,
int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
+ int ret;
+
+ if (type == ACL_TYPE_ACCESS && acl) {
+ ret = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+ if (ret)
+ return ret;
+ }
return __f2fs_set_acl(inode, type, acl, NULL);
}
--
2.13.0.rc1.294.g07d810a77f-goog
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] f2fs: Don't clear SGID when inheriting ACLs Jaegeuk Kim <jaegeuk@kernel.org> - 2017-07-11 23:00 +0200
Re: [PATCH v2] f2fs: Don't clear SGID when inheriting ACLs Jaegeuk Kim <jaegeuk@kernel.org> - 2017-07-12 01:40 +0200
Re: [f2fs-dev] [PATCH v2] f2fs: Don't clear SGID when inheriting ACLs Chao Yu <chao@kernel.org> - 2017-07-13 06:10 +0200
Re: [PATCH v2] f2fs: Don't clear SGID when inheriting ACLs Jan Kara <jack@suse.cz> - 2017-07-13 17:20 +0200
csiph-web