From: Kinglong Mee <kinglongmee@gmail.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org
Subject: [PATCH] f2fs: fix a bug of inheriting default ACL from parent
Date: Sat, 24 Jan 2015 17:06:25 +0800 [thread overview]
Message-ID: <54C36091.4000509@gmail.com> (raw)
Introduced by a6dda0e63e97122ce9e0ba04367e37cca28315fa
"f2fs: use generic posix ACL infrastructure".
When testing default acl, gets in recent kernel (3.19.0-rc5),
# setfacl -dm g:root:rwx test/
# getfacl test/
# file: test/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:root:rwx
default:mask::rwx
default:other::r-x
# cd test/
# mkdir testdir
]# getfacl testdir/
# file: testdir/
# owner: root
# group: root
user::rwx
group::rwx
// missing an acl "group:root:rwx" inherited from parent
other::r-x
default:user::rwx
default:group::r-x
default:group:root:rwx
default:mask::rwx
default:other::r-x
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
fs/f2fs/acl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 1ccb26b..b0b23578 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -396,7 +396,7 @@ int f2fs_init_acl(struct inode *inode, struct inode
*dir, struct page *ipage,
posix_acl_release(default_acl);
}
if (acl) {
- if (error)
+ if (!error)
error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl,
ipage);
posix_acl_release(acl);
--
2.1.0
next reply other threads:[~2015-01-24 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-24 9:06 Kinglong Mee [this message]
2015-01-26 12:11 ` [f2fs-dev] [PATCH] f2fs: fix a bug of inheriting default ACL from parent Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C36091.4000509@gmail.com \
--to=kinglongmee@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).