]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: unlock inodes in correct order in clone ioctl
authorFilipe David Borba Manana <fdmanana@gmail.com>
Sat, 11 Jan 2014 21:31:25 +0000 (21:31 +0000)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:20:30 +0000 (13:20 -0800)
commit4ec36b0ef90f8ec0553a5243947522ee94643183
tree7dc61c170e763cb469c0d11957152e702356093a
parent5b696f9c121ebdea555a747cfc33bf3cef960b12
Btrfs: unlock inodes in correct order in clone ioctl

In the clone ioctl, when the source and target inodes are different,
we can acquire their mutexes in 2 possible different orders. After
we're done cloning, we were releasing the mutexes always in the same
order - the most correct way of doing it is to release them by the
reverse order they were acquired.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ioctl.c