Re: JFFS2/xattr problems.

David Woodhouse
2006-06-26T15:45:16Z

On Sat, 2006-06-24 at 14:58 +0900, KaiGai Kohei wrote:
> [3/5] jffs2-xattr-v6.1-03-redefine-refcnt-as-atomic_t.patch
> In jffs2_release_xattr_datum(), it refers xd->refcnt to ensure
> whether releasing xd is allowed or not.
> But we can't hold xattr_sem since this function is called under
> spin_lock(&c->erase_completion_lock). Thus we have to refer it
> without any locking.

Surely c->alloc_sem is sufficient for this purpose? We can never change
the refcount of anything without writing to the medium, so the alloc_sem
ought to be enough.

--
dwmw2