From: Andrew Morton <akpm@osdl.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: linux-kernel@vger.kernel.org, James Morris <jmorris@namei.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: Access Control Lists for tmpfs
Date: Fri, 1 Sep 2006 14:52:03 -0700 [thread overview]
Message-ID: <20060901145203.d3880d1d.akpm@osdl.org> (raw)
In-Reply-To: <20060901221458.148480972@winden.suse.de>
On Sat, 02 Sep 2006 00:14:23 +0200
Andreas Gruenbacher <agruen@suse.de> wrote:
> +static void
> +shmem_set_acl(struct inode *inode, int type, struct posix_acl *acl)
> +{
> + spin_lock(&inode->i_lock);
> + switch(type) {
> + case ACL_TYPE_ACCESS:
> + if (SHMEM_I(inode)->i_acl)
> + posix_acl_release(SHMEM_I(inode)->i_acl);
> + SHMEM_I(inode)->i_acl = posix_acl_dup(acl);
> + break;
i_lock is "general-purpose, innermost per-inode lock". Calling kfree()
under it makes it no longer "innermost". But kfree() is surely atomic wrt
everything which filesystems and the VFS will want to do, so that's OK.
However it does point at an inefficiency. There's no need at all to be
holding onto that lock while running kfree().
--
VGER BF report: H 0
next prev parent reply other threads:[~2006-09-01 21:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-01 22:14 [patch 0/2] Tmpfs acls Andreas Gruenbacher
2006-09-01 22:14 ` Generic infrastructure for acls Andreas Gruenbacher
2006-09-01 21:44 ` Andrew Morton
2006-09-01 22:32 ` Andreas Gruenbacher
2006-09-06 16:40 ` Andreas Gruenbacher
2006-09-06 20:06 ` Randy.Dunlap
2006-09-06 6:54 ` Jan Engelhardt
2006-09-01 22:14 ` Access Control Lists for tmpfs Andreas Gruenbacher
2006-09-01 21:52 ` Andrew Morton [this message]
2006-09-02 7:24 ` Arjan van de Ven
2006-09-05 19:07 ` Andrew Morton
2006-09-06 16:40 ` Andreas Gruenbacher
2006-09-06 7:02 ` Jan Engelhardt
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=20060901145203.d3880d1d.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=agruen@suse.de \
--cc=jmorris@namei.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@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
Powered by JetHome