GFS2: Fix locking bug in rename
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 9 Dec 2009 13:55:12 +0000 (13:55 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 8 Jan 2010 13:42:42 +0000 (13:42 +0000)
commit24b977b5fdea09bf356428870d32c09a275c8a3e
tree60b93ab4d8ac034952d658a35057d5e729bd331a
parent56aa616a03feca630d5afce647367a5d8cfc67b8
GFS2: Fix locking bug in rename

The rename code was taking a resource group lock in cases where
it wasn't actually needed, this caused problems if the rename
was resulting in an inode being unlinked. The patch ensures that
we only take the rgrp lock early if it is really needed.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_inode.c