All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1] OCFS2: add spin lock when accessing inode->i_nlink.
@ 2008-09-22  9:15 wangang wang
  2008-09-22 21:18 ` Sunil Mushran
  0 siblings, 1 reply; 5+ messages in thread
From: wangang wang @ 2008-09-22  9:15 UTC (permalink / raw)
  To: ocfs2-devel

add spin lock when accessing inode->i_nlink in ocfs2_drop_inode().

the patch is against 1.2 svn.

Signed-off-by: Wengang wang <wen.gang.wang@oracle.com>
--
Index: fs/ocfs2/inode.c
===================================================================
--- fs/ocfs2/inode.c	(revision 3101)
+++ fs/ocfs2/inode.c	(working copy)
@@ -991,10 +991,12 @@
 	/* Testing ip_orphaned_slot here wouldn't work because we may
 	 * not have gotten a delete_inode vote from any other nodes
 	 * yet. */
+	spin_lock(&oi->ip_lock);
 	if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) {
 		mlog(0, "Inode was orphaned on another node, clearing nlink.\n");
 		inode->i_nlink = 0;
 	}
+	spin_unlock(&oi->ip_lock);
 
 	generic_drop_inode(inode);
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-23  7:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22  9:15 [Ocfs2-devel] [PATCH 1/1] OCFS2: add spin lock when accessing inode->i_nlink wangang wang
2008-09-22 21:18 ` Sunil Mushran
2008-09-23  2:16   ` wengang wang
2008-09-23  3:23     ` Tao Ma
2008-09-23  7:42       ` wengang wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.