aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-10-29 15:37:33 -0400
committerChris Mason <chris.mason@oracle.com>2010-10-29 15:37:33 -0400
commitfccdae435c1b295cca546f23f6f43126a28ffac3 (patch)
treee5c84325114cd554c62e7e275e85596200b45d19 /fs/btrfs/ioctl.c
parent050006a753bab8ba05f2113cc57ba49398cd5521 (diff)
Btrfs: fix lockdep warning on clone ioctl
I'm no lockdep expert, but this appears to make the lockdep warning go away for the i_mutex locking in the clone ioctl. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3fe15e435b5c..93d69b32028e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1492,11 +1492,11 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
1492 path->reada = 2; 1492 path->reada = 2;
1493 1493
1494 if (inode < src) { 1494 if (inode < src) {
1495 mutex_lock(&inode->i_mutex); 1495 mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
1496 mutex_lock(&src->i_mutex); 1496 mutex_lock_nested(&src->i_mutex, I_MUTEX_CHILD);
1497 } else { 1497 } else {
1498 mutex_lock(&src->i_mutex); 1498 mutex_lock_nested(&src->i_mutex, I_MUTEX_PARENT);
1499 mutex_lock(&inode->i_mutex); 1499 mutex_lock_nested(&inode->i_mutex, I_MUTEX_CHILD);
1500 } 1500 }
1501 1501
1502 /* determine range to clone */ 1502 /* determine range to clone */