Skip to content
Commit a9743fcd authored by Mark Fasheh's avatar Mark Fasheh
Browse files

ocfs2: Add directory entry later in ocfs2_symlink() and ocfs2_mknod()



If we get a failure during creation of an inode we'll allow the orphan code
to remove the inode, which is correct. However, we need to ensure that we
don't get any errors after the call to ocfs2_add_entry(), otherwise we could
leave a dangling directory reference. The solution is simple - in both
cases, all I had to do was move ocfs2_dentry_attach_lock() above the
ocfs2_add_entry() call.

Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 062d3403
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment