lkml.org 
[lkml]   [2006]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Access Control Lists for tmpfs
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-01 23:55    [W:1.652 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site