Skip to content

Commit

Permalink
ocfs2: Re-order iput in ocfs2_drop_dentry_lock
Browse files Browse the repository at this point in the history
Do this to avoid a theoretical (I haven't seen this in practice) race where
the downconvert thread might drop the dentry lock, allowing a remote unlink
to proceed before dropping the inode locks. This could bounce access to the
orphan dir between nodes.

There doesn't seem to be a need to do the same in ocfs2_dentry_iput() as
that's never called for the last ref drop from the downconvert thread.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed Nov 6, 2007
1 parent 019d1b2 commit 9f70968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ocfs2/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry,
static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb,
struct ocfs2_dentry_lock *dl)
{
iput(dl->dl_inode);
ocfs2_simple_drop_lockres(osb, &dl->dl_lockres);
ocfs2_lock_res_free(&dl->dl_lockres);
iput(dl->dl_inode);
kfree(dl);
}

Expand Down

0 comments on commit 9f70968

Please sign in to comment.