]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Add directory entry later in ocfs2_symlink() and ocfs2_mknod()
authorMark Fasheh <mfasheh@suse.com>
Fri, 23 Apr 2010 18:42:22 +0000 (11:42 -0700)
committerMark Fasheh <mfasheh@suse.com>
Fri, 23 Apr 2010 18:42:22 +0000 (11:42 -0700)
commitc5432ef85e4f0f0cf1a3f72a9192c05897519f17
treec893396ac248e5f570a774b5b375d94b2858ae34
parent97e7595c528706837e0ec6e0d94b5ad2c75a6797
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: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/namei.c