> Hello,
>
> I am facing similar problems John Trostel is seeing, using XFS ACLs.
> To investigate this, I have written a simple test program using libacl:
> fd = open("testfile",O_RDONLY);
> acl_get_fd(fd);
> close(fd);
>
> After executing this on a XFS or EXT2 partition, the partition
> can't be unmounted any more (device busy). Removing files
> also won't free up any space.
>
> I traced the problem down to sys_acl_get() in fs/posix_acl.c,
> where fget() is called without fput() afterwards. If I understand
> this correctly, using fget() increases file->count, so one has to
> use fput() to decrease the counter again:
>
> struct file * f = fget (fdes);
> if (f)
> {
> dentry = f->f_dentry;
> fput(f);
> }
>
> After adding fput(f) as shown above, all seems to work fine.
> Maybe someone can comment if this fix is correct ?
>
> ... Juergen
Yep, this whole problem smells of reference counts not being released, and
the file descriptor version of the acl code certainly seems to be buggy. Here
is a variation on your fix - we really want to keep the reference on the
file while manipulating the acl. Let me know if this fixes your problems
and I will put this in cvs.
Steve
acl.patch
Description: acl.patch
|