From: Chengguang Xu <cgxu519@gmx.com> To: jack@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, shaggy@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: devel@lists.orangefs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, jfs-discussion@lists.sourceforge.net, Chengguang Xu <cgxu519@gmx.com> Subject: [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL Date: Fri, 31 Aug 2018 22:33:48 +0800 [thread overview] Message-ID: <20180831143352.22970-1-cgxu519@gmx.com> (raw) default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- v1->v2: - Coding style change. fs/ext2/acl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 224c04abb2e5..cf4c77f8dd08 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c @@ -256,11 +256,15 @@ ext2_init_acl(struct inode *inode, struct inode *dir) if (default_acl) { error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); posix_acl_release(default_acl); + } else { + inode->i_default_acl = NULL; } if (acl) { if (!error) error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS); posix_acl_release(acl); + } else { + inode->i_acl = NULL; } return error; } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Chengguang Xu <cgxu519@gmx.com> To: jack@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, shaggy@kernel.org, hubcap@omnibond.com, martin@omnibond.com Cc: jfs-discussion@lists.sourceforge.net, Chengguang Xu <cgxu519@gmx.com>, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, devel@lists.orangefs.org Subject: [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL Date: Fri, 31 Aug 2018 22:33:48 +0800 [thread overview] Message-ID: <20180831143352.22970-1-cgxu519@gmx.com> (raw) default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- v1->v2: - Coding style change. fs/ext2/acl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 224c04abb2e5..cf4c77f8dd08 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c @@ -256,11 +256,15 @@ ext2_init_acl(struct inode *inode, struct inode *dir) if (default_acl) { error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); posix_acl_release(default_acl); + } else { + inode->i_default_acl = NULL; } if (acl) { if (!error) error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS); posix_acl_release(acl); + } else { + inode->i_acl = NULL; } return error; } -- 2.17.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next reply other threads:[~2018-08-31 14:34 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-31 14:33 Chengguang Xu [this message] 2018-08-31 14:33 ` [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL Chengguang Xu 2018-08-31 14:33 ` [PATCH v2 2/5] ext4: " Chengguang Xu 2018-08-31 14:33 ` Chengguang Xu 2018-09-03 8:57 ` Jan Kara 2018-09-12 15:04 ` cgxu519 2018-09-12 15:04 ` cgxu519 2018-10-07 3:36 ` Theodore Y. Ts'o 2018-10-07 3:36 ` Theodore Y. Ts'o 2018-08-31 14:33 ` [PATCH v2 3/5] f2fs: " Chengguang Xu 2018-08-31 14:33 ` Chengguang Xu 2018-09-02 7:55 ` [f2fs-dev] " Chao Yu 2018-09-11 20:12 ` Jaegeuk Kim 2018-08-31 14:33 ` [PATCH v2 4/5] jfs: " Chengguang Xu 2018-08-31 14:33 ` Chengguang Xu 2018-09-03 20:34 ` [Jfs-discussion] " Dave Kleikamp 2018-09-03 20:34 ` Dave Kleikamp 2018-09-05 6:13 ` cgxu519 2018-09-05 6:13 ` cgxu519 2018-09-05 12:28 ` Dave Kleikamp 2018-08-31 14:33 ` [PATCH v2 5/5] orangefs: " Chengguang Xu 2018-08-31 14:33 ` Chengguang Xu 2018-09-07 18:11 ` Mike Marshall 2018-09-03 9:03 ` [PATCH v2 1/5] ext2: " Jan Kara
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=20180831143352.22970-1-cgxu519@gmx.com \ --to=cgxu519@gmx.com \ --cc=adilger.kernel@dilger.ca \ --cc=devel@lists.orangefs.org \ --cc=hubcap@omnibond.com \ --cc=jack@suse.com \ --cc=jaegeuk@kernel.org \ --cc=jfs-discussion@lists.sourceforge.net \ --cc=linux-ext4@vger.kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ --cc=martin@omnibond.com \ --cc=shaggy@kernel.org \ --cc=tytso@mit.edu \ --cc=yuchao0@huawei.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.