Displaying 1 result from an estimated 1 matches for "ocfs2_rmdir".
Did you mean:
ocfs2_mkdir
2009 Feb 12
0
Deadlock in rename path
...ble_lock() locks directories in the inode number order. But
for a directory structure like:
d1
/ \
f1 d2
/
f2
if you do 'mv f1 f2' and in parallel do something like 'rmdir d2' then
ocfs2_double_lock() can try locking directories in order 'd2','d1' but
ocfs2_rmdir() tries locking directories in order 'd1', 'd2' -> deadlock.
The solution could be to mimic VFS behavior in lock_rename() and check
whether one of the directories is not parent of the other one and lock
in appropriate order. But the problem with this is that we don't have
dir...