aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2007-03-20 19:01:38 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2007-04-26 17:39:48 -0400
commit500086300e6dc5308a7328990bd50d17e075162b (patch)
tree4083cda09445c260c2cc2ac1d0f68c05ad2b958e /fs/ocfs2/namei.c
parenta9f5f70739363ccca2e771c274c4f015c5fb7a88 (diff)
ocfs2: Remove delete inode vote
Ocfs2 currently does cluster-wide node messaging to check the open state of an inode during delete. This patch removes that mechanism in favor of an inode cluster lock which is taken at shared read when an inode is first read and dropped in clear_inode(). This allows a deleting node to test the liveness of an inode by attempting to take an exclusive lock. Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 1fff0c02d98b..a93c15fdcef3 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -187,7 +187,6 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
187 * unlink. */ 187 * unlink. */
188 spin_lock(&oi->ip_lock); 188 spin_lock(&oi->ip_lock);
189 oi->ip_flags &= ~OCFS2_INODE_MAYBE_ORPHANED; 189 oi->ip_flags &= ~OCFS2_INODE_MAYBE_ORPHANED;
190 oi->ip_orphaned_slot = OCFS2_INVALID_SLOT;
191 spin_unlock(&oi->ip_lock); 190 spin_unlock(&oi->ip_lock);
192 191
193bail_add: 192bail_add:
@@ -2220,9 +2219,7 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb,
2220 /* Record which orphan dir our inode now resides 2219 /* Record which orphan dir our inode now resides
2221 * in. delete_inode will use this to determine which orphan 2220 * in. delete_inode will use this to determine which orphan
2222 * dir to lock. */ 2221 * dir to lock. */
2223 spin_lock(&OCFS2_I(inode)->ip_lock); 2222 fe->i_orphaned_slot = cpu_to_le16(osb->slot_num);
2224 OCFS2_I(inode)->ip_orphaned_slot = osb->slot_num;
2225 spin_unlock(&OCFS2_I(inode)->ip_lock);
2226 2223
2227 mlog(0, "Inode %llu orphaned in slot %d\n", 2224 mlog(0, "Inode %llu orphaned in slot %d\n",
2228 (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num); 2225 (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num);