summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/xattr.h
diff options
context:
space:
mode:
authorKaiGai Kohei <kaigai@ak.jp.nec.com>2006-06-24 09:16:50 +0900
committerDavid Woodhouse <dwmw2@infradead.org>2006-06-27 16:19:06 +0100
commit2c887e2359f6e7217cdaa17994ca94ef328b658f (patch)
tree4af246384893ec0b18380aacb97cc0f2a0226ec8 /fs/jffs2/xattr.h
parent355ed4e141203fd7266ef9d90d57be0c61bd1aa4 (diff)
downloadop-kernel-dev-2c887e2359f6e7217cdaa17994ca94ef328b658f.zip
op-kernel-dev-2c887e2359f6e7217cdaa17994ca94ef328b658f.tar.gz
[JFFS2][XATTR] Re-define xd->refcnt as atomic_t
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. This patch redefine xd->refcnt as atomic_t. It enables to refer xd->refcnt without any locking. Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/xattr.h')
-rw-r--r--fs/jffs2/xattr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/xattr.h b/fs/jffs2/xattr.h
index 4a10abc..06a5c69 100644
--- a/fs/jffs2/xattr.h
+++ b/fs/jffs2/xattr.h
@@ -28,7 +28,7 @@ struct jffs2_xattr_datum
uint16_t xprefix; /* see JFFS2_XATTR_PREFIX_* */
struct list_head xindex; /* chained from c->xattrindex[n] */
- uint32_t refcnt; /* # of xattr_ref refers this */
+ atomic_t refcnt; /* # of xattr_ref refers this */
uint32_t xid;
uint32_t version;
OpenPOWER on IntegriCloud